Method Compare
Compare(RaycastHit, RaycastHit)
Compares ray cast hits by distance in ascending order.
Declaration
public int Compare(RaycastHit a, RaycastHit b)
Parameters
| Type | Name | Description |
|---|---|---|
| RaycastHit | a | The first ray cast hit to compare. |
| RaycastHit | b | The second ray cast hit to compare. |
Returns
| Type | Description |
|---|---|
| int | Returns less than 0 if a is closer than b. 0 if a and b are equal. Greater than 0 if b is closer than a. |