about summary refs log tree commit diff
path: root/src/Models.cpp
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2023-03-25 22:14:03 +0900
committerNguyễn Gia Phong <mcsinyx@disroot.org>2023-03-25 22:14:03 +0900
commit968d8a86f5a7e08f71bd449a466cc467efb11e3d (patch)
treebfd82936edd7439e48412a43892340ea25b5a672 /src/Models.cpp
parentd7f9a74f75ba0ce2167fa0e529a009becdcee7e3 (diff)
downloadblackshades-968d8a86f5a7e08f71bd449a466cc467efb11e3d.tar.gz
Convert square of norm calculation to Zig
Diffstat (limited to 'src/Models.cpp')
-rw-r--r--src/Models.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Models.cpp b/src/Models.cpp
index e706ebf..a414008 100644
--- a/src/Models.cpp
+++ b/src/Models.cpp
@@ -52,7 +52,7 @@ void Model::CalculateNormals()
 	boundingsphereradius = 0;
 	for (int i = 0; i < vertexNum; ++i)
 		boundingsphereradius = std::max(boundingsphereradius,
-			findDistancefast(boundingspherecenter, vertex[i]));
+			sqrlen(boundingspherecenter - vertex[i]));
 	boundingsphereradius = sqrt(boundingsphereradius);
 }