bevy/crates/bevy_math/src
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
..
bounding Add more Glam types and constructors to prelude (#16261) 2024-11-11 18:47:16 +00:00
curve Use normal constructors for EasingCurve, FunctionCurve, ConstantCurve (#16367) 2024-11-13 15:30:05 +00:00
primitives Implement Measured2d for Arc2d-based primitives. (#16213) 2024-11-03 16:12:31 +00:00
rects Use en-us locale for typos (#16037) 2024-10-20 18:55:17 +00:00
sampling Use en-us locale for typos (#16037) 2024-10-20 18:55:17 +00:00
affine3.rs Implemented Reflect for (almost) all bevy_math types (#13537) 2024-05-27 18:18:10 +00:00
aspect_ratio.rs Remove thiserror from bevy_math (#15769) 2024-10-09 14:23:23 +00:00
common_traits.rs Bump crate-ci/typos from 1.26.8 to 1.27.0 (#16236) 2024-11-05 01:33:27 +00:00
compass.rs Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
cubic_splines.rs Put curve-related stuff behind a feature (#15790) 2024-10-09 16:38:23 +00:00
direction.rs Remove thiserror from bevy_math (#15769) 2024-10-09 14:23:23 +00:00
float_ord.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
isometry.rs Implement From translation and rotation for isometries (#15733) 2024-10-08 16:09:28 +00:00
lib.rs Add more Glam types and constructors to prelude (#16261) 2024-11-11 18:47:16 +00:00
ops.rs Simpler lint fixes: makes ci lints work but disables a lint for now (#15376) 2024-09-24 11:42:59 +00:00
ray.rs Use Dir2/Dir3 instead of Vec2/Vec3 for Ray2d::new/Ray3d::new (#15735) 2024-10-08 16:45:03 +00:00
rotation2d.rs Rename Rot2::angle_between to Rot2::angle_to (#16327) 2024-11-10 14:36:48 +00:00