Cargo Features
[dependencies]
bevy_math = { version = "0.18.0", 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 ^0.9, optional rand_distr ^0.5, and optional serde
rand:
Supply rngs for examples and tests
and std of derive_more, glam ^0.30.7, 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 ^0.9, optional rand_distr ^0.5, 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
-
Enables serde, serde of glam ^0.30.7
- approx
-
Enable approx for glam types to approximate floating point equality comparisons and assertions
Enables approx, approx of glam ^0.30.7
- mint
-
Enable interoperation of glam types with mint-compatible libraries
Enables mint of glam ^0.30.7
- libm
-
Enable libm mathematical functions for glam types to ensure consistent outputs across platforms at the cost of losing hardware-level optimization using intrinsics
Enables libm, libm of glam ^0.30.7
- glam_assert
-
Enable assertions to check the validity of parameters passed to glam
Enables glam-assert of glam ^0.30.7
- debug_glam_assert
-
Enable assertions in debug builds to check the validity of parameters passed to glam
Enables debug-glam-assert of glam ^0.30.7
- rand default
-
Enable the rand dependency for shape_sampling
Enables rand ^0.9 and rand_distr ^0.5, rand of glam ^0.30.7
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 ^0.30.7