Cargo Features

[dependencies]
bevy_math = { version = "0.16.0-rc.3", 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_math is added without default-features = false somewhere in the dependency tree.

std default = alloc

Enables use_std of itertools and std of optional rand ^0.8, optional rand_distr ^0.4.3, and optional serde

rand:

Supply rngs for examples and tests

and std of derive_more ^1, glam ^0.29.3, optional approx, and optional bevy_reflect

bevy_reflect:

Platform Compatibility

Allows access to the std crate. Enabling this feature will prevent compilation on no_std targets, but provides access to certain additional features on supported platforms.

alloc bevy_reflect? std

Enables use_alloc of itertools, alloc of optional rand ^0.8, optional rand_distr ^0.4.3, 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::BoxedPolyline2d, dim2::BoxedPolygon, dim3::BoxedPolyline3d, polygon::is_polygon_simple

serialize

Enables serde, serde of glam ^0.29.3

approx

Enable approx for glam types to approximate floating point equality comparisons and assertions

Enables approx, approx of glam ^0.29.3

mint

Enable interoperation of glam types with mint-compatible libraries

Enables mint of glam ^0.29.3

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.29.3

glam_assert

Enable assertions to check the validity of parameters passed to glam

Enables glam-assert of glam ^0.29.3

debug_glam_assert

Enable assertions in debug builds to check the validity of parameters passed to glam

Enables debug-glam-assert of glam ^0.29.3

rand default

Enable the rand dependency for shape_sampling

Enables rand ^0.8 and rand_distr ^0.4.3, rand of glam ^0.29.3

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.29.3