[package]
name = "bevy_math"
version = "0.17.0-dev"
edition = "2024"
description = "Provides math functionality for Bevy Engine"
homepage = "https://bevy.org"
repository = "https://github.com/bevyengine/bevy"
license = "MIT OR Apache-2.0"
keywords = ["bevy"]
rust-version = "1.85.0"
[dependencies]
glam = { version = "0.30.1", default-features = false, features = ["bytemuck"] }
thiserror = { version = "2", default-features = false }
derive_more = { version = "2", default-features = false, features = [
"from",
"into",
] }
itertools = { version = "0.14.0", default-features = false }
serde = { version = "1", default-features = false, features = [
"derive",
], optional = true }
libm = { version = "0.2", optional = true }
approx = { version = "0.5", default-features = false, optional = true }
rand = { version = "0.9", default-features = false, optional = true }
rand_distr = { version = "0.5", optional = true }
smallvec = { version = "1", default-features = false }
bevy_reflect = { path = "../bevy_reflect", version = "0.17.0-dev", default-features = false, features = [
"glam",
], optional = true }
variadics_please = "1.1"
[dev-dependencies]
approx = "0.5"
rand = "0.9"
rand_chacha = "0.9"
bevy_math = { path = ".", default-features = false, features = ["approx"] }
glam = { version = "0.30.1", default-features = false, features = ["approx"] }
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
getrandom = { version = "0.3", default-features = false, features = [
"wasm_js",
] }
[features]
default = ["std", "rand", "curve"]
std = [
"alloc",
"glam/std",
"derive_more/std",
"itertools/use_std",
"serde?/std",
"approx?/std",
"rand?/std",
"rand_distr?/std",
"bevy_reflect?/std",
]
alloc = [
"itertools/use_alloc",
"serde?/alloc",
"rand?/alloc",
"rand_distr?/alloc",
]
serialize = ["dep:serde", "glam/serde"]
approx = ["dep:approx", "glam/approx"]
mint = ["glam/mint"]
libm = ["dep:libm", "glam/libm"]
glam_assert = ["glam/glam-assert"]
debug_glam_assert = ["glam/debug-glam-assert"]
rand = ["dep:rand", "dep:rand_distr", "glam/rand"]
curve = []
bevy_reflect = ["dep:bevy_reflect", "alloc"]
nostd-libm = ["dep:libm", "glam/nostd-libm"]
[lints]
workspace = true
[package.metadata.docs.rs]
rustdoc-args = ["-Zunstable-options", "--generate-link-to-definition"]
all-features = true