Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Compare(T, T)

Compares two values.
Read time 1 minuteLast updated 13 days ago

Definition

  • Type: Method
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule
public int Compare(T x, T y)

Parameters

x

T
First value to compare.

y

T
Second value to compare.

Returns

Type

Description

intA signed integer that denotes the relative values of
x
and
y
: 0 if they're equal, negative if
x < y
, and positive if
x > y
.