Skip to content

Commit

Permalink
fix ci errors
Browse files Browse the repository at this point in the history
  • Loading branch information
aevyrie committed Feb 27, 2023
1 parent 18aa56f commit 20d31ac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
1 change: 0 additions & 1 deletion crates/bevy_math/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ keywords = ["bevy"]
[dependencies]
glam = { version = "0.22", features = ["bytemuck"] }
serde = { version = "1", features = ["derive"], optional = true }
smallvec = { version = "1.6", features = ["union", "const_generics"] }

[features]
# Enable interoperation of glam types with mint-compatible libraries
Expand Down
11 changes: 3 additions & 8 deletions crates/bevy_math/src/cubic_splines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ impl CubicSegment<Vec2> {
/// always start at 0 and end at 1: `ease(0) = 0` and `ease(1) = 1`.
///
/// ```
/// # use bevy_math::CubicEasing;
/// let cubic_bezier = CubicEasing::new_bezier((0.25, 0.1), (0.25, 1.0));
/// # use bevy_math::prelude::*;
/// let cubic_bezier = CubicSegment::new_bezier((0.25, 0.1), (0.25, 1.0));
/// assert_eq!(cubic_bezier.ease(0.0), 0.0);
/// assert_eq!(cubic_bezier.ease(1.0), 1.0);
/// ```
Expand Down Expand Up @@ -312,11 +312,6 @@ impl CubicSegment<Vec2> {
/// > Use Newton's method to find a value of `t` that results in B(t) = (x,y) where `x == time`
///
/// > Once a solution is found, use the resulting `y` value as the final result
///
/// # Performance
///
/// This operation can be used frequently without fear of performance issues. Benchmarks show
/// this operation taking on the order of 0.7 nanoseconds.
#[inline]
pub fn ease(&self, time: f32) -> f32 {
let x = time.clamp(0.0, 1.0);
Expand Down Expand Up @@ -414,7 +409,7 @@ impl<P: Point> CubicCurve<P> {
self.iter_samples(subdivisions, Self::acceleration)
}

/// Returns the [`Segment`] and local `t` value given a spline's global `t` value.
/// Returns the [`CubicSegment`] and local `t` value given a spline's global `t` value.
#[inline]
fn segment(&self, t: f32) -> (&CubicSegment<P>, f32) {
if self.segments.len() == 1 {
Expand Down
6 changes: 3 additions & 3 deletions crates/bevy_math/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ pub use rect::Rect;
pub mod prelude {
#[doc(hidden)]
pub use crate::{
BSpline, BVec2, BVec3, BVec4, Bezier, CardinalSpline, CubicGenerator, EulerRot, Hermite,
IVec2, IVec3, IVec4, Mat2, Mat3, Mat4, Quat, Ray, Rect, UVec2, UVec3, UVec4, Vec2, Vec3,
Vec4,
BSpline, BVec2, BVec3, BVec4, Bezier, CardinalSpline, CubicGenerator, CubicSegment,
EulerRot, Hermite, IVec2, IVec3, IVec4, Mat2, Mat3, Mat4, Quat, Ray, Rect, UVec2, UVec3,
UVec4, Vec2, Vec3, Vec4,
};
}

Expand Down

0 comments on commit 20d31ac

Please sign in to comment.