mirror of
https://github.com/bevyengine/bevy
synced 2024-11-14 00:47:32 +00:00
Re-export glam_assert feature (#8232)
# Objective - Allow the use of the "glam _assert" feature to help catch runtime errors and validate the arguments passed to glam. e.g. ```rs // Will panic if self is zero length when glam_assert is enabled. pub fn normalize(self) -> Self { let normalized = self.mul(self.length_recip()); glam_assert!(normalized.is_finite()); normalized } ``` ## Solution - Re-export the optional feature glam_assert --- ## Changelog Added: Optional feature "glam_assert"
This commit is contained in:
parent
e2b8cc836b
commit
bb63ad7fab
4 changed files with 10 additions and 1 deletions
|
@ -219,6 +219,9 @@ tonemapping_luts = ["bevy_internal/tonemapping_luts"]
|
||||||
# Enable AccessKit on Unix backends (currently only works with experimental screen readers and forks.)
|
# Enable AccessKit on Unix backends (currently only works with experimental screen readers and forks.)
|
||||||
accesskit_unix = ["bevy_internal/accesskit_unix"]
|
accesskit_unix = ["bevy_internal/accesskit_unix"]
|
||||||
|
|
||||||
|
# Enable assertions to check the validity of parameters passed to glam
|
||||||
|
glam_assert = ["bevy_internal/glam_assert"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bevy_dylib = { path = "crates/bevy_dylib", version = "0.11.0-dev", default-features = false, optional = true }
|
bevy_dylib = { path = "crates/bevy_dylib", version = "0.11.0-dev", default-features = false, optional = true }
|
||||||
bevy_internal = { path = "crates/bevy_internal", version = "0.11.0-dev", default-features = false }
|
bevy_internal = { path = "crates/bevy_internal", version = "0.11.0-dev", default-features = false }
|
||||||
|
|
|
@ -92,6 +92,9 @@ accesskit_unix = ["bevy_winit/accesskit_unix"]
|
||||||
|
|
||||||
bevy_text = ["dep:bevy_text", "bevy_ui?/bevy_text"]
|
bevy_text = ["dep:bevy_text", "bevy_ui?/bevy_text"]
|
||||||
|
|
||||||
|
# Enable assertions to check the validity of parameters passed to glam
|
||||||
|
glam_assert = ["bevy_math/glam_assert"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# bevy
|
# bevy
|
||||||
bevy_a11y = { path = "../bevy_a11y", version = "0.11.0-dev" }
|
bevy_a11y = { path = "../bevy_a11y", version = "0.11.0-dev" }
|
||||||
|
|
|
@ -13,6 +13,8 @@ glam = { version = "0.23", features = ["bytemuck"] }
|
||||||
serde = { version = "1", features = ["derive"], optional = true }
|
serde = { version = "1", features = ["derive"], optional = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
serialize = ["dep:serde", "glam/serde"]
|
||||||
# Enable interoperation of glam types with mint-compatible libraries
|
# Enable interoperation of glam types with mint-compatible libraries
|
||||||
mint = ["glam/mint"]
|
mint = ["glam/mint"]
|
||||||
serialize = ["dep:serde", "glam/serde"]
|
# Enable assertions to check the validity of parameters passed to glam
|
||||||
|
glam_assert = ["glam/glam-assert"]
|
||||||
|
|
|
@ -51,6 +51,7 @@ The default feature set enables most of the expected features of a game engine,
|
||||||
|dynamic_linking|Force dynamic linking, which improves iterative compile times|
|
|dynamic_linking|Force dynamic linking, which improves iterative compile times|
|
||||||
|exr|EXR image format support|
|
|exr|EXR image format support|
|
||||||
|flac|FLAC audio format support|
|
|flac|FLAC audio format support|
|
||||||
|
|glam_assert|Enable assertions to check the validity of parameters passed to glam|
|
||||||
|jpeg|JPEG image format support|
|
|jpeg|JPEG image format support|
|
||||||
|minimp3|MP3 audio format support (through minimp3)|
|
|minimp3|MP3 audio format support (through minimp3)|
|
||||||
|mp3|MP3 audio format support|
|
|mp3|MP3 audio format support|
|
||||||
|
|
Loading…
Reference in a new issue