Skip to content

Commit

Permalink
Workaround for float_consts used by TnuaBuiltinWalk to avoid maki…
Browse files Browse the repository at this point in the history
…ng a release for the physics integration crate
  • Loading branch information
idanarye committed May 18, 2024
1 parent d7d8a2a commit 631a578
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/builtins/walk.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
use std::time::Duration;

use crate::math::{float_consts, AdjustPrecision, Float, Quaternion, Vector3};
use crate::math::{AdjustPrecision, AsF32, Float, Quaternion, Vector3};
use bevy::prelude::*;
use bevy_tnua_physics_integration_layer::math::AsF32;

use crate::util::rotation_arc_around_axis;
use crate::TnuaBasisContext;
use crate::{TnuaBasis, TnuaVelChange};

// TODO: Once I make a release of the integration layer crate that includes float_consts, import
// that from there (adding this reexport does not justify a release of that crate...)
#[cfg(not(feature = "f64"))]
use std::f32::consts as float_consts;
#[cfg(feature = "f64")]
use std::f64::consts as float_consts;

/// The most common [basis](TnuaBasis) - walk around as a floating capsule.
///
/// This basis implements the floating capsule character controller explained in
Expand Down

0 comments on commit 631a578

Please sign in to comment.