Added DistanceTo to vec class

This commit is contained in:
Jan Mrna
2025-10-02 20:48:05 +02:00
committed by Mrna
parent 0e17c84eb9
commit 92b36a8943
2 changed files with 37 additions and 0 deletions

View File

@@ -153,6 +153,11 @@ public:
return std::sqrt(LengthSquared());
}
T DistanceTo(const vec& b) const {
const vec& a = *this;
return (a - b).Length();
}
//
// In-place vector operations
//