veccentric

Crates.ioveccentric
lib.rsveccentric
version0.3.1
sourcesrc
created_at2021-08-08 18:36:26.912461
updated_at2021-09-22 18:59:16.505174
descriptionTiny 2D vector library.
homepage
repositoryhttps://github.com/micouy/veccentric
max_upload_size
id433286
size406,491
Mikołaj Powierża (micouy)

documentation

README

veccentric

docs.rs crates.io

Tiny 2D vector library. Inspired by p5.js's p5.Vector.

Usage

Add veccentric to your Cargo.toml.

[dependencies]
veccentric = "0.3"

Basic arithmetic on Vecc<T>.

use veccentric::Vecc;

let a = Vecc::new(3_i32, 4);
let b = a * 5;
let c = Vecc::new(-10, -8);
let d = b - c;
let e = -d;

Fecc's extended API.

use veccentric::Fecc;

let a: Fecc = (3.0, 4.0).into();
let b = a / 0.2;
let c = b.limit(20.0);
let d = c.rotate(PI);
let e = d.turn(0.0);

See more examples.

Commit count: 55

cargo fmt