#vector #graph

melius-vectors

Simple 2-4 dimensional vectors that can be easily created and manipulated

3 releases

0.1.2 Mar 31, 2022
0.1.1 Oct 6, 2021
0.1.0 Oct 5, 2021

#1423 in Math

Download history 7/week @ 2024-02-21 11/week @ 2024-02-28 17/week @ 2024-03-27 35/week @ 2024-04-03

52 downloads per month

Apache-2.0

15KB
325 lines

melius-vectors

Simple 2-4 dimensional vectors that can be easily created and manipulated.

Installation

Under your Cargo.toml's [Dependencies], add the following dependency:

melius-vectors = { git = "https://github.com/PutterBeanut/melius-vectors/" }

Usage

use melius_vectors::vector2::Vector2;

let mut my_vector: Vector2<f32> = Vector2::empty();
my_vector += Vector2::new(20, 10);
my_vector /= Vector2::new(4, 2);

println!("{}", my_vector); // Prints "{5.0, 5.0}"

No runtime deps