Struct dumbmath::vec2f::Line2f
[−]
[src]
pub struct Line2f { pub points: (Vec2f, Vec2f), }
Fields
points |
Methods
impl Line2f
fn new(a: Vec2f, b: Vec2f) -> Line2f
fn reverse(self) -> Line2f
fn closest_parametric_point(self, point: Vec2f) -> f32
fn point_distance_squared(self, point: Vec2f) -> f32
fn cart_from_para(self, t: f32) -> Vec2f
fn orient(self, point: Vec2f) -> f32
If result is greater than zero point
lies to the left of the
line. If result is less than zero point
lies to the
right. If result is zero, the point is on the line.
The value is also twice the signed area of the triangle
(points.0, points.1, point)
(positive if counterclockwise,
otherwise negative).
Adapted from "Real-Time Collision Detection" by Christer Ericson, published by Morgan Kaufmann Publishers, Copyright 2005 Elsevier Inc