AP_Math: added a .zero() method to Vector3f

This commit is contained in:
Andrew Tridgell 2012-03-03 11:52:31 +11:00
parent a0e2e69431
commit de32c3bc31

View File

@ -145,6 +145,10 @@ public:
void normalize()
{ *this/=length(); }
// zero the vector
void zero()
{ x = y = z = 0.0; }
// returns the normalized version of this vector
Vector3<T> normalized() const
{ return *this/length(); }