We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 173c613 commit c67f5eaCopy full SHA for c67f5ea
src/icosphere.rs
@@ -216,4 +216,14 @@ mod tests {
216
assert_relative_eq!(mean_weight, 0.9999999999999999, epsilon = 1e-6);
217
assert_relative_eq!(weight_stddev, 0.028536625575550475, epsilon = 1e-6);
218
}
219
+
220
+ #[test]
221
+ fn test_spherical_face_area() {
222
+ // Equilateral triangle on the unit sphere
223
+ let a = Vec3A::new(1.0, 0.0, 0.0);
224
+ let b = Vec3A::new(0.0, 1.0, 0.0);
225
+ let c = Vec3A::new(0.0, 0.0, 1.0);
226
+ let area = spherical_face_area(&a, &b, &c);
227
+ assert_relative_eq!(area, 0.5 * PI, epsilon = 1e-6);
228
+ }
229
0 commit comments