coord2d 0.1.0

rust lib for coordinate in 2d system
Documentation
coord2d-0.1.0 has been yanked.

#modules coord2d rust lib for coordinate in 2d system

example

use coord2d::*;

fn main() {
    let coord1: coords::Coord = coords::new(3, 4);
    let coord2: coords::Coord = coords::new(5, 13);
    let sum: coords::Coord = coord1 + coord2;

    println!("{:?}", sum);

    let line : vectors::Vector = vectors::new(coord1, coord2);

    println!("{:?}", line);
    let h = vectors::new(a, b);
    let m = h + l;
    let s = h + l;
    println!("\nlet h = points::new(a, b); | {:?}", h);
    println!("\nlet m = h + l; | {:?}", m);
    println!("\nlet s = h + l; | {:?}", s);
    
}

TO DO

  • basic math
  • add fn give magnitude of vector
  • add properties

stats

Anurag's GitHub stats

Top Langs