vector2 0.1.5

A simple 2D vector library
Documentation
  • Coverage
  • 96.77%
    30 out of 31 items documented1 out of 21 items with examples
  • Size
  • Source code size: 10.25 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 682.38 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • tz629

vector2

Vector2 is a simple library for using and creating 2D vectors.

Example

use vector2::Vector2;

// Create a Vector2
let vector2 = Vector2::new(1.0, 0.5);

// (1.0, 0.0)
let other = Vector2::RIGHT;

// Add two Vector2s
let added = vector2 + other;

assert_eq!(added.x, 2.0);
assert_eq!(added.y, 0.5);