Cargo Features
[dependencies]
bevy_math = { version = "0.18.0-rc.1", default-features = false, features = ["std", "alloc", "serialize", "approx", "mint", "libm", "glam_assert", "debug_glam_assert", "rand", "curve", "bevy_reflect", "nostd-libm"] }
- default = curve, rand, std
-
These default features are set whenever
bevy_mathis added withoutsomewhere in the dependency tree.default-features = false - std default = alloc
-
Enables use_std of itertools and std of optional rand, optional rand_distr, and optional serde
rand:
Supply rngs for examples and tests
and std of derive_more, glam, optional approx, and optional bevy_reflect
bevy_reflect:
Platform Compatibility
Allows access to the
stdcrate. Enabling this feature will prevent compilation onno_stdtargets, but provides access to certain additional features on supported platforms. - alloc bevy_reflect? std
-
Enables use_alloc of itertools, alloc of optional rand, optional rand_distr, and optional serde
Affects
cubic_splines::CubicBezier,cubic_splines::CubicHermite,cubic_splines::CubicCardinalSpline,cubic_splines::CubicBSpline,cubic_splines::CubicNurbs,cubic_splines::LinearSpline,cubic_splines::CubicGenerator,cubic_splines::CyclicCubicGenerator,cubic_splines::CubicCurve,cubic_splines::RationalGenerator,cubic_splines::RationalCurve,cores::EvenCore,cores::UnevenCore,cores::ChunkedUnevenCore,curve::sample_curves,curve::CurveResampleExt,dim2::Polyline2d,dim2::Polygon,dim2::ConvexPolygon,dim2::ConvexPolygonError… - serialize
- approx
-
Enable approx for glam types to approximate floating point equality comparisons and assertions
- mint
-
Enable interoperation of glam types with mint-compatible libraries
- libm
-
Enable libm mathematical functions for glam types to ensure consistent outputs across platforms at the cost of losing hardware-level optimization using intrinsics
- glam_assert
-
Enable assertions to check the validity of parameters passed to glam
Enables glam-assert of glam
- debug_glam_assert
-
Enable assertions in debug builds to check the validity of parameters passed to glam
Enables debug-glam-assert of glam
- rand default
-
Enable the rand dependency for shape_sampling
Enables rand and rand_distr, rand of glam
Affects
bevy_math::sampling… - curve default
-
Include code related to the Curve trait
Affects
bevy_math::curve… - bevy_reflect = alloc
-
Enable bevy_reflect (requires alloc)
Enables bevy_reflect
- nostd-libm
-
Enable libm mathematical functions as a fallback for no_std environments.
Can be overridden with std feature.Enables libm, nostd-libm of glam