Math: add Vector2 is_zero method
This commit is contained in:
parent
08e1a66772
commit
a0906188b3
@ -105,6 +105,9 @@ struct Vector2
|
|||||||
// check if any elements are infinity
|
// check if any elements are infinity
|
||||||
bool is_inf(void) const;
|
bool is_inf(void) const;
|
||||||
|
|
||||||
|
// check if all elements are zero
|
||||||
|
bool is_zero(void) const { return (fabsf(x) < FLT_EPSILON) && (fabsf(y) < FLT_EPSILON); }
|
||||||
|
|
||||||
// zero the vector
|
// zero the vector
|
||||||
void zero()
|
void zero()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user