From 775616b6ed56f4d783913d8b69c1628928d77662 Mon Sep 17 00:00:00 2001 From: wer8888 <91093536+plagakit@users.noreply.github.com> Date: Tue, 19 Mar 2024 18:13:26 -0400 Subject: [PATCH] Add length squared method to Vector3 --- include/Vector3.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/Vector3.hpp b/include/Vector3.hpp index 2492d85e..2d0218ac 100644 --- a/include/Vector3.hpp +++ b/include/Vector3.hpp @@ -213,6 +213,13 @@ class Vector3 : public ::Vector3 { return Vector3Length(*this); } + /** + * Calculate vector square length + */ + float LengthSqr() const { + return Vector3LengthSqr(*this); + } + Vector3 Normalize() const { return Vector3Normalize(*this); }