Cargo Features

[dependencies]
bevy_math = { version = "0.15.3", default-features = false, features = ["serialize", "approx", "mint", "libm", "glam_assert", "debug_glam_assert", "rand", "curve", "bevy_reflect"] }
default = bevy_reflect, curve, rand

These default features are set whenever bevy_math is added without default-features = false somewhere in the dependency tree.

serialize

Enables serde, serde of glam ^0.29

approx

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

Enables approx, approx of glam ^0.29

mint

Enable interoperation of glam types with mint-compatible libraries

Enables mint of glam ^0.29

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

glam_assert

Enable assertions to check the validity of parameters passed to glam

Enables glam-assert of glam ^0.29

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

rand default

Enable the rand dependency for shape_sampling

Enables rand of glam ^0.29 and rand ^0.8 and rand_distr ^0.4.3

rand:

Supply rngs for examples and tests

Affects bevy_math::sampling

curve default

Include code related to the Curve trait

Affects bevy_math::curve

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

bevy_reflect default