new_vector

Macro new_vector 

Source
macro_rules! new_vector {
    () => { ... };
    ($end:expr) => { ... };
    ($start:expr, $end:expr) => { ... };
}
Expand description

§creating a new Vector

§Example
use coord2d::*;

let a: coord::Coord = new_coord!(1, 2.0);
let b: coord::Coord = new_coord!(0.4, 3.3);
let h:vector::Vector = new_vector!(a, b);
  • the var h contains to var start point and end point point
  • while magnitude get calculated automatically