Cargo Features

[dependencies]
bevy_math = { version = "0.15.0", 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

approx

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

Enables approx, approx of glam

mint

Enable interoperation of glam types with mint-compatible libraries

Enables mint of glam

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

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 of glam and rand and rand_distr

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