[package]
edition = "2024"
rust-version = "1.85"
name = "gemath"
version = "0.1.0"
build = false
exclude = ["dev/**"]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Type-safe game math with type-level units/spaces, typed angles, and explicit fallible ops (plus optional geometry/collision)."
homepage = "https://github.com/bogwi/gemath"
documentation = "https://docs.rs/gemath"
readme = "README.md"
keywords = [
"math",
"gamedev",
"linear-algebra",
"collision",
"no-std",
]
categories = [
"mathematics",
"game-development",
"no-std",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/bogwi/gemath"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
aabb2 = ["vec2"]
aabb3 = ["vec3"]
alloc = []
angle = ["scalar"]
collision = [
"geometry",
"rect2",
"rect3",
"aabb2",
"aabb3",
]
default = [
"std",
"full",
]
full = [
"half_float",
"angle",
"scalar",
"vec2",
"vec3",
"vec4",
"mat2",
"mat3",
"mat4",
"quat",
"unit_vec",
"rect2",
"rect3",
"aabb2",
"aabb3",
"geometry",
"collision",
"spatial",
"polygon2",
]
geometry = [
"vec2",
"vec3",
]
half_float = []
libm = [
"dep:libm",
"math",
]
mat2 = ["vec2"]
mat3 = [
"vec3",
"math",
]
mat4 = [
"vec4",
"math",
]
math = []
mint = [
"dep:mint",
"vec2",
"vec3",
"vec4",
"mat2",
"mat3",
"mat4",
"quat",
]
polygon2 = ["vec2"]
quat = [
"vec4",
"math",
]
rect2 = ["vec2"]
rect3 = ["vec3"]
scalar = ["math"]
serde = [
"dep:serde",
"half/serde",
]
spatial = [
"geometry",
"aabb2",
"aabb3",
]
std = ["math"]
unit_vec = [
"vec2",
"vec3",
"vec4",
]
vec2 = ["angle"]
vec3 = ["angle"]
vec4 = [
"vec3",
"math",
]
[lib]
name = "gemath"
path = "src/lib.rs"
[[test]]
name = "aabb2_test"
path = "tests/aabb2_test.rs"
[[test]]
name = "aabb3_test"
path = "tests/aabb3_test.rs"
[[test]]
name = "collision_test"
path = "tests/collision_test.rs"
[[test]]
name = "geometry_test"
path = "tests/geometry_test.rs"
[[test]]
name = "half_float_test"
path = "tests/half_float_test.rs"
[[test]]
name = "mat2_test"
path = "tests/mat2_test.rs"
[[test]]
name = "mat3_test"
path = "tests/mat3_test.rs"
[[test]]
name = "mat4_test"
path = "tests/mat4_test.rs"
[[test]]
name = "mint_test"
path = "tests/mint_test.rs"
[[test]]
name = "obb_test"
path = "tests/obb_test.rs"
[[test]]
name = "polygon2_test"
path = "tests/polygon2_test.rs"
[[test]]
name = "property_mat_inverse_test"
path = "tests/property_mat_inverse_test.rs"
[[test]]
name = "property_quat_test"
path = "tests/property_quat_test.rs"
[[test]]
name = "property_vec_unitvec_test"
path = "tests/property_vec_unitvec_test.rs"
[[test]]
name = "quat_test"
path = "tests/quat_test.rs"
[[test]]
name = "rect2_test"
path = "tests/rect2_test.rs"
[[test]]
name = "rect3_test"
path = "tests/rect3_test.rs"
[[test]]
name = "scalar_test"
path = "tests/scalar_test.rs"
[[test]]
name = "spatial_test"
path = "tests/spatial_test.rs"
[[test]]
name = "unit_vec_test"
path = "tests/unit_vec_test.rs"
[[test]]
name = "vec2_test"
path = "tests/vec2_test.rs"
[[test]]
name = "vec3_test"
path = "tests/vec3_test.rs"
[[test]]
name = "vec4_test"
path = "tests/vec4_test.rs"
[[bench]]
name = "math_benchmarks"
path = "benches/math_benchmarks.rs"
harness = false
[[bench]]
name = "spatial_benchmarks"
path = "benches/spatial_benchmarks.rs"
harness = false
[dependencies.half]
version = "2.6.0"
[dependencies.libm]
version = "0.2"
optional = true
[dependencies.mint]
version = "0.5.9"
optional = true
[dependencies.serde]
version = "1.0"
features = ["derive"]
optional = true
[dev-dependencies.criterion]
version = "0.5"
features = ["html_reports"]
[dev-dependencies.glam]
version = "0.30.3"
[dev-dependencies.proptest]
version = "1"
[dev-dependencies.serde_json]
version = "1.0"