mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-24 08:26:01 +00:00
Allow specified tolerance for NearlyEq checks
This commit is contained in:
@@ -161,7 +161,7 @@ impl From<Vec3> for SphericalCoords {
|
||||
}
|
||||
|
||||
let pitch = f32::asin(-y / radius);
|
||||
let heading = if (pitch - 90_f32.to_radians()).abs() < 1e-3_f32 {
|
||||
let heading = if pitch.nearly_eq_within(90_f32.to_radians(), 1e-3) {
|
||||
0.
|
||||
} else {
|
||||
f32::atan2(x, z)
|
||||
|
||||
Reference in New Issue
Block a user