Skip to content

Commit 775616b

Browse files
committed
Add length squared method to Vector3
1 parent c589702 commit 775616b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/Vector3.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@ class Vector3 : public ::Vector3 {
213213
return Vector3Length(*this);
214214
}
215215

216+
/**
217+
* Calculate vector square length
218+
*/
219+
float LengthSqr() const {
220+
return Vector3LengthSqr(*this);
221+
}
222+
216223
Vector3 Normalize() const {
217224
return Vector3Normalize(*this);
218225
}

0 commit comments

Comments
 (0)