nsys-math-utils 1.0.0

Math types and traits
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use math_utils::*;
use geometry::*;

fn main() {
  use num::One;

  shape::report_sizes();
  mesh::half_edge::report_sizes();

  let sphere = shape::Sphere { radius: Positive::one() };
  let mut sphere3 = sphere.to_primitive (point3 (1.0, 1.0, 1.0));
  println!("SPHERE3: {sphere3:?}");
  sphere3.translate (vector3 (-1.0, 0.0, 0.0));
  sphere3.scale (Positive::noisy (0.5));
  println!("SPHERE3: {sphere3:?}");
}