Document None conditions on compute_aabb (#11051)
The error conditions were not documented, this requires the user to inspect the source code to know when to expect a `None`. Error conditions should always be documented, so we document them. --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
This commit is contained in:
		
							parent
							
								
									049de6fcbe
								
							
						
					
					
						commit
						fcb49a5d80
					
				| @ -566,6 +566,9 @@ impl Mesh { | ||||
|     } | ||||
| 
 | ||||
|     /// Compute the Axis-Aligned Bounding Box of the mesh vertices in model space
 | ||||
|     ///
 | ||||
|     /// Returns `None` if `self` doesn't have [`Mesh::ATTRIBUTE_POSITION`] of
 | ||||
|     /// type [`VertexAttributeValues::Float32x3`], or if `self` doesn't have any vertices.
 | ||||
|     pub fn compute_aabb(&self) -> Option<Aabb> { | ||||
|         let Some(VertexAttributeValues::Float32x3(values)) = | ||||
|             self.attribute(Mesh::ATTRIBUTE_POSITION) | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Nicola Papale
						Nicola Papale