Type Definition turtle::Point [] [src]

type Point = [f64; 2];

A point in 2D space: [x, y]

let p: Point = [100., 120.];
// get x coordinate
let x = p[0];
assert_eq!(x, 100.);
// get y coordinate
let y = p[1];
assert_eq!(y, 120.);