Struct dumbmath::quad::Quad2f
[−]
[src]
pub struct Quad2f { pub points: (Vec2f, Vec2f, Vec2f, Vec2f), }
2D Quadrilateral
top
p3________p2
| |
| |
left | | right
| |
|________|
p0 p1
bottom
Fields
points |
Methods
impl Quad2f
fn new(a: Vec2f, b: Vec2f, c: Vec2f, d: Vec2f) -> Quad2f
fn iblerp(self, point: Vec2f) -> IBLerpResult
Inverse bilinear interpolation
Adapted from stackoverflow.com/questions/808441
fn inv_bilerp_u(self, point: Vec2f) -> InvBilerpResult
Calculate horizontal parametric coordinate from cartesian point.