trying to get a custom comparator to sort my IntersectionList after a merge()
git-svn-id: svn://anubis/fart/trunk@149 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
1 parent
56278a8337
commit
25d6432dbd
4 files changed
+47
-2
No files matched your search
@@ -49,6 +49,11 @@ double Vector::mag2() const
|
||||
+ m_array[2] * m_array[2];
|
||||
}
|
||||
|
||||
double Vector::dist_to(const Vector & other) const
|
||||
{
|
||||
return (other - *this).mag();
|
||||
}
|
||||
|
||||
Vector Vector::proj(const Vector & target) const
|
||||
{
|
||||
Vector target_normalized = target;
|
||||
|
||||
@@ -15,6 +15,7 @@ class Vector
|
||||
Vector & normalize();
|
||||
double mag() const;
|
||||
double mag2() const;
|
||||
double dist_to(const Vector & other) const;
|
||||
Vector proj(const Vector & target) const;
|
||||
Vector reflect(const Vector & target) const;
|
||||
|
||||
|
||||
Reference in new issue
Block a user