Function piston_window::math::line_side[][src]

pub fn line_side<T>(line: [T; 4], v: [T; 2]) -> T where
    T: Float

Returns a number that tells which side it is relative to a line.

Computes the cross product of the vector that gives the line with the vector between point and starting point of line. One side of the line has opposite sign of the other.