Added DistanceTo to vec class

This commit is contained in:
Jan Mrna authored and Mrna committed 2025-10-07 10:19:06 +02:00
1 parent 0e17c84eb9
commit 92b36a8943
2 files changed
+37

No files matched your search

+5
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
//