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
					
				@ -14,6 +14,8 @@ serde = { version = "1", features = ["derive"], optional = true }
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
[features]
 | 
					[features]
 | 
				
			||||||
serialize = ["dep:serde", "glam/serde"]
 | 
					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
 | 
					# Enable interoperation of glam types with mint-compatible libraries
 | 
				
			||||||
mint = ["glam/mint"]
 | 
					mint = ["glam/mint"]
 | 
				
			||||||
# Enable assertions to check the validity of parameters passed to glam
 | 
					# Enable assertions to check the validity of parameters passed to glam
 | 
				
			||||||
 | 
				
			|||||||
@ -24,8 +24,8 @@ thiserror = "1.0"
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
[dev-dependencies]
 | 
					[dev-dependencies]
 | 
				
			||||||
bevy_tasks = { path = "../bevy_tasks", version = "0.12.0" }
 | 
					bevy_tasks = { path = "../bevy_tasks", version = "0.12.0" }
 | 
				
			||||||
 | 
					bevy_math = { path = "../bevy_math", version = "0.12.0", features = ["approx"] }
 | 
				
			||||||
approx = "0.5.1"
 | 
					approx = "0.5.1"
 | 
				
			||||||
glam = { version = "0.24", features = ["approx"] }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
[features]
 | 
					[features]
 | 
				
			||||||
serialize = ["dep:serde", "bevy_math/serialize"]
 | 
					serialize = ["dep:serde", "bevy_math/serialize"]
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user