mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Add approx
feature to bevy_math
(#11176)
# Objective `bevy_math` re-exports Glam, but doesn't have a feature for enabling `approx` for it. Many projects (including some of Bevy's own crates) need `approx`, and it'd be nice if you didn't have to manually add Glam to specify the feature for it. ## Solution Add an `approx` feature to `bevy_math`.
This commit is contained in:
parent
2c5439b25e
commit
536a7bd810
2 changed files with 3 additions and 1 deletions
|
@ -14,6 +14,8 @@ serde = { version = "1", features = ["derive"], optional = true }
|
|||
|
||||
[features]
|
||||
serialize = ["dep:serde", "glam/serde"]
|
||||
# Enable approx for glam types to approximate floating point equality comparisons and assertions
|
||||
approx = ["glam/approx"]
|
||||
# Enable interoperation of glam types with mint-compatible libraries
|
||||
mint = ["glam/mint"]
|
||||
# Enable assertions to check the validity of parameters passed to glam
|
||||
|
|
|
@ -24,8 +24,8 @@ thiserror = "1.0"
|
|||
|
||||
[dev-dependencies]
|
||||
bevy_tasks = { path = "../bevy_tasks", version = "0.12.0" }
|
||||
bevy_math = { path = "../bevy_math", version = "0.12.0", features = ["approx"] }
|
||||
approx = "0.5.1"
|
||||
glam = { version = "0.24", features = ["approx"] }
|
||||
|
||||
[features]
|
||||
serialize = ["dep:serde", "bevy_math/serialize"]
|
||||
|
|
Loading…
Reference in a new issue