Fix missing IsZero and IsOne for int32
This commit is contained in:
@@ -435,6 +435,14 @@ namespace Math
|
||||
return amount <= 0 ? 0 : amount >= 1 ? 1 : amount * amount * amount * (amount * (amount * 6 - 15) + 10);
|
||||
}
|
||||
|
||||
// Determines whether the specified value is close to zero (0.0)
|
||||
// @param a The integer value
|
||||
// @returns True if the specified value is close to zero (0.0). otherwise false
|
||||
inline int32 IsZero(int32 a)
|
||||
{
|
||||
return a == 0;
|
||||
}
|
||||
|
||||
// Determines whether the specified value is close to zero (0.0f)
|
||||
// @param a The floating value
|
||||
// @returns True if the specified value is close to zero (0.0f). otherwise false
|
||||
@@ -443,6 +451,14 @@ namespace Math
|
||||
return Abs(a) < ZeroTolerance;
|
||||
}
|
||||
|
||||
// Determines whether the specified value is close to one (1.0)
|
||||
// @param a The integer value
|
||||
// @returns True if the specified value is close to one (1.0). otherwise false
|
||||
inline bool IsOne(int32 a)
|
||||
{
|
||||
return a == 1;
|
||||
}
|
||||
|
||||
// Determines whether the specified value is close to one (1.0f)
|
||||
// @param a The floating value
|
||||
// @returns True if the specified value is close to one (1.0f). otherwise false
|
||||
|
||||
Reference in New Issue
Block a user