浏览代码

Remove unnecessary line from Projection::get_z_far

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.
Matthew 2 年之前
父节点
当前提交
9f21dfbafd
共有 1 个文件被更改,包括 0 次插入1 次删除
  1. 0 1
      core/math/projection.cpp

+ 0 - 1
core/math/projection.cpp

@@ -408,7 +408,6 @@ real_t Projection::get_z_far() const {
 			matrix[11] - matrix[10],
 			matrix[11] - matrix[10],
 			matrix[15] - matrix[14]);
 			matrix[15] - matrix[14]);
 
 
-	new_plane.normal = -new_plane.normal;
 	new_plane.normalize();
 	new_plane.normalize();
 
 
 	return new_plane.d;
 	return new_plane.d;