Skip to content

Commit 03cf2f9

Browse files
authored
Merge pull request #310 from plagakit/master
Add LengthSqr method to Vector3
2 parents c589702 + 775616b commit 03cf2f9

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)