Macro pix_engine::line_

source ·
macro_rules! line_ {
    ($p1:expr, $p2:expr$(,)?) => { ... };
    ($x1:expr, $y1:expr, $x2:expr, $y2:expr$(,)?) => { ... };
    ($x1:expr, $y1:expr, $z1:expr, $x2:expr, $y2:expr, $z2:expr$(,)?) => { ... };
}
Expand description

Constructs a Line with two points.


let l = line_!([10, 20], [30, 10]);
assert_eq!(l.points(), [
  point!(10, 20),
  point!(30, 10),
]);

let l = line_!([10, 20, 10], [30, 10, 40]);
assert_eq!(l.points(), [
  point!(10, 20, 10),
  point!(30, 10, 40),
]);