Skip to content

Commit f4f6d2b

Browse files
committed
Cargo fmt
1 parent 2bf4e93 commit f4f6d2b

File tree

1 file changed

+11
-9
lines changed
  • gdnative-core/src/core_types/geom

1 file changed

+11
-9
lines changed

gdnative-core/src/core_types/geom/plane.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ impl Plane {
4545
pub fn from_points(a: Vector3, b: Vector3, c: Vector3) -> Option<Plane> {
4646
let normal = (a - c).cross(a - b).normalize();
4747

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+
}
5656
}
5757

5858
/// Returns the center of the `Plane`.
@@ -191,7 +191,9 @@ mod test {
191191

192192
let expected_valid = Plane::from_coordinates(0.447214, 0.0, -0.894427, -0.447214);
193193

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));
195197
assert_eq!(Plane::from_points(a, b, d), None);
196198
}
197199

0 commit comments

Comments
 (0)