File tree 1 file changed +6
-12
lines changed
1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -72,13 +72,10 @@ idBounds::PlaneDistance
72
72
================
73
73
*/
74
74
float idBounds::PlaneDistance ( const idPlane &plane ) const {
75
- idVec3 center;
76
- float d1, d2;
77
-
78
- center = ( b[0 ] + b[1 ] ) * 0 .5f ;
75
+ idVec3 center = ( b[0 ] + b[1 ] ) * 0 .5f ;
79
76
80
- d1 = plane.Distance ( center );
81
- d2 = (
77
+ float d1 = plane.Distance ( center );
78
+ float d2 = (
82
79
idMath::Fabs ( ( b[1 ].x - center.x ) * plane.Normal ().x ) +
83
80
idMath::Fabs ( ( b[1 ].y - center.y ) * plane.Normal ().y ) +
84
81
idMath::Fabs ( ( b[1 ].z - center.z ) * plane.Normal ().z )
@@ -99,13 +96,10 @@ idBounds::PlaneSide
99
96
================
100
97
*/
101
98
int idBounds::PlaneSide ( const idPlane &plane, const float epsilon ) const {
102
- idVec3 center;
103
- float d1, d2;
104
-
105
- center = ( b[0 ] + b[1 ] ) * 0 .5f ;
99
+ idVec3 center = ( b[0 ] + b[1 ] ) * 0 .5f ;
106
100
107
- d1 = plane.Distance ( center );
108
- d2 = (
101
+ float d1 = plane.Distance ( center );
102
+ float d2 = (
109
103
idMath::Fabs ( ( b[1 ].x - center.x ) * plane.Normal ().x ) +
110
104
idMath::Fabs ( ( b[1 ].y - center.y ) * plane.Normal ().y ) +
111
105
idMath::Fabs ( ( b[1 ].z - center.z ) * plane.Normal ().z )
You can’t perform that action at this time.
0 commit comments