Type Alias Point3D
Source pub type Point3D = Vec3;
Expand description
Represents a 3D point in space.
Alias for Vec3.
pub struct Point3D {
pub x: f64,
pub y: f64,
pub z: f64,
}
X component of the vector.
Y component of the vector.
Z component of the vector.
Finds the unsigned distance between self and another 3D point Other.
#examples
use lars::{Point3D};
let a = Point3D::new(1.0, 0.0, 0.0);
let b = Point3D::new(0.0, 0.0, 0.0);
assert_eq!(a.dist(&b), 1.0)
Finds the unsigned distance between self and another 3D point Other, squared
#examples
use lars::Point3D;
let a = Point3D::new(2.0, 0.0, 0.0);
let b = Point3D::new(0.0, 0.0, 0.0);
assert_eq!(a.dist_sq(&b), 4.0)