C# Class UnityPlatformerUtils.Compare

Show file Open project: LukeZaz/UnityPlatformerUtils

Public Methods

Method Description
inRange ( double num, double first, double second ) : bool

Tests if a double is within the provided range. Also returns true if the number was equal to the lower or upper limit.

inRange ( float num, float first, float second ) : bool

Tests if a float is within the provided range. Also returns true if the number was equal to the lower or upper limit.

inRange ( int num, int first, int second ) : bool

Tests if a integer is within the provided range. Also returns true if the number was equal to the lower or upper limit.

Method Details

inRange() public static method

Tests if a double is within the provided range. Also returns true if the number was equal to the lower or upper limit.
public static inRange ( double num, double first, double second ) : bool
num double Number to check.
first double First part of range. Can be lower or higher than second.
second double Second part of range. Can be lower or higher than first.
return bool

inRange() public static method

Tests if a float is within the provided range. Also returns true if the number was equal to the lower or upper limit.
public static inRange ( float num, float first, float second ) : bool
num float Number to check.
first float First part of range. Can be lower or higher than second.
second float Second part of range. Can be lower or higher than first.
return bool

inRange() public static method

Tests if a integer is within the provided range. Also returns true if the number was equal to the lower or upper limit.
public static inRange ( int num, int first, int second ) : bool
num int Number to check.
first int First part of range. Can be lower or higher than second.
second int Second part of range. Can be lower or higher than first.
return bool