bevy/crates/bevy_math/src/curve
Carter Anderson 7477928f13
Use normal constructors for EasingCurve, FunctionCurve, ConstantCurve (#16367)
# Objective

We currently use special "floating" constructors for `EasingCurve`,
`FunctionCurve`, and `ConstantCurve` (ex: `easing_curve`). This erases
the type being created (and in general "what is happening"
structurally), for very minimal ergonomics improvements. With rare
exceptions, we prefer normal `X::new()` constructors over floating `x()`
constructors in Bevy. I don't think this use case merits special casing
here.

## Solution

Add `EasingCurve::new()`, use normal constructors everywhere, and remove
the floating constructors.

I think this should land in 0.15 in the interest of not breaking people
later.
2024-11-13 15:30:05 +00:00
..
adaptors.rs Bump crate-ci/typos from 1.26.8 to 1.27.0 (#16236) 2024-11-05 01:33:27 +00:00
cores.rs Remove thiserror from bevy_math (#15769) 2024-10-09 14:23:23 +00:00
easing.rs Use normal constructors for EasingCurve, FunctionCurve, ConstantCurve (#16367) 2024-11-13 15:30:05 +00:00
interval.rs Remove thiserror from bevy_math (#15769) 2024-10-09 14:23:23 +00:00
iterable.rs Curve-based animation (#15434) 2024-09-30 19:56:55 +00:00
mod.rs Use normal constructors for EasingCurve, FunctionCurve, ConstantCurve (#16367) 2024-11-13 15:30:05 +00:00
sample_curves.rs Fix some duplicate words in docs/comments (#15980) 2024-10-20 01:03:27 +00:00