Struct bcar::Point [−][src]
Basic point geometry.
Examples
let point = bcar::Point::new(1.0, 2.0); assert_eq!(1.0, point.x); assert_eq!(2.0, point.y);
Fields
x: f64
y: f64
Implementations
impl Point
[src]
impl Point
[src]pub fn new(x: f64, y: f64) -> Point
[src]
pub fn default() -> Point
[src]
Return default point
Examples
let point = bcar::Point::default(); assert_eq!(point, bcar::Point::new(0.0, 0.0));
pub fn on_right_side_of(&self, s: Point, e: Point) -> bool
[src]
Return if self
is on right side of line.
Examples
let p = bcar::Point::new(1.0, -2.0); let s = bcar::Point::new(1.0, 1.0); let e = bcar::Point::new(-1.0, -1.0); assert!(!p.on_right_side_of(s, e)); assert!(p.on_right_side_of(e, s));
Trait Implementations
impl StructuralPartialEq for Point
[src]
impl StructuralPartialEq for Point
[src]Auto Trait Implementations
impl RefUnwindSafe for Point
impl RefUnwindSafe for Point
impl UnwindSafe for Point
impl UnwindSafe for Point