diff options
| author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2023-03-25 22:14:03 +0900 |
|---|---|---|
| committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2023-03-25 22:14:03 +0900 |
| commit | 968d8a86f5a7e08f71bd449a466cc467efb11e3d (patch) | |
| tree | bfd82936edd7439e48412a43892340ea25b5a672 /src/Models.cpp | |
| parent | d7f9a74f75ba0ce2167fa0e529a009becdcee7e3 (diff) | |
| download | blackshades-968d8a86f5a7e08f71bd449a466cc467efb11e3d.tar.gz | |
Convert square of norm calculation to Zig
Diffstat (limited to 'src/Models.cpp')
| -rw-r--r-- | src/Models.cpp | 2 |
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); } |
