added double cast operator to Vector to return its length

git-svn-id: svn://anubis/fart/trunk@249 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop 2010-06-18 01:53:54 +00:00
parent ca95190dbe
commit 8fb2492e0a

View File

@ -18,6 +18,7 @@ class Vector
double dist_to(const Vector & other) const;
Vector proj(const Vector & target) const;
Vector reflect(const Vector & target) const;
operator double() { return mag(); }
protected:
double m_array[3];