File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
gdnative-core/src/core_types/geom Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -45,14 +45,14 @@ impl Plane {
45
45
pub fn from_points ( a : Vector3 , b : Vector3 , c : Vector3 ) -> Option < Plane > {
46
46
let normal = ( a - c) . cross ( a - b) . normalize ( ) ;
47
47
48
- if normal. x . is_nan ( ) || normal. y . is_nan ( ) || normal. z . is_nan ( ) {
49
- None
50
- } else {
51
- Some ( Plane {
52
- normal,
53
- d : normal. dot ( a) ,
54
- } )
55
- }
48
+ if normal. x . is_nan ( ) || normal. y . is_nan ( ) || normal. z . is_nan ( ) {
49
+ None
50
+ } else {
51
+ Some ( Plane {
52
+ normal,
53
+ d : normal. dot ( a) ,
54
+ } )
55
+ }
56
56
}
57
57
58
58
/// Returns the center of the `Plane`.
@@ -191,7 +191,9 @@ mod test {
191
191
192
192
let expected_valid = Plane :: from_coordinates ( 0.447214 , 0.0 , -0.894427 , -0.447214 ) ;
193
193
194
- assert ! ( Plane :: from_points( a, b, c) . unwrap( ) . approx_eq( expected_valid) ) ;
194
+ assert ! ( Plane :: from_points( a, b, c)
195
+ . unwrap( )
196
+ . approx_eq( expected_valid) ) ;
195
197
assert_eq ! ( Plane :: from_points( a, b, d) , None ) ;
196
198
}
197
199
You can’t perform that action at this time.
0 commit comments