Skip to content

Commit

Permalink
Remove unnecessary line from Projection::get_z_far
Browse files Browse the repository at this point in the history
Removes a line from Projection::get_z_far that flips the normal of a plane.
While this may be required for similar code elsewhere in the file, this is
unnecessary here, as only the length of the normal is used and not the
direction. Flipping the normal does not change its magnitude and therefore is
unnecessary in this case.
  • Loading branch information
spazzylemons authored Sep 20, 2023
1 parent 0ba19c3 commit 9f21dfb
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion core/math/projection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@ real_t Projection::get_z_far() const {
matrix[11] - matrix[10],
matrix[15] - matrix[14]);

new_plane.normal = -new_plane.normal;
new_plane.normalize();

return new_plane.d;
Expand Down

0 comments on commit 9f21dfb

Please sign in to comment.