Skip to content

Commit

Permalink
Updated README and Cargo.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob2309 committed Aug 17, 2021
1 parent 921018d commit 0cf77cc
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
[package]
name = "gfx-maths-rs"
name = "gfx-maths"
version = "0.1.0"
authors = [ "Robin Quint" ]
edition = "2018"
description = "Implementations for the most essential Graphics Math operations"
repository = "https://github.com/rob2309/gfx-maths-rs"
license = "MIT"
keywords = [
"graphics", "vector", "matrix", "quaternion", "vulkan", "opengl", "maths", "directx",
"vec2", "vec3", "vec4", "mat4", "glm"
]
categories = [
"data-structures", "graphics", "game-development", "mathematics"
]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# GFX Maths
This crate implements all the basic mathematical structures and operations
that are needed for almost any graphical program, namely:
- [Vec2](src/vec2.rs)
- [Vec3](src/vec3.rs)
- [Vec4](src/vec4.rs)
- [Quaternion](src/quaternion.rs)
- [Mat4](src/mat4.rs)

The usual operations are implemented via member functions and operator overloads.
Operators should handle almost exactly as they would in GLSL, e.g.
```Rust
use gfx_maths_rs::*;

let v = Vec3::new(5.0, 6.0, 7.0);
let s = 1.0 / v;

let t = Mat4::translate(Vec3::new(1.0, 0.0, 0.0)) * s;
```

# Notation
Vectors are always treated as column vectors, which is why
only [Mat4](src/mat4.rs) * [Vec4](src/vec4.rs) is implemented and not [Vec4](src/vec4.rs) * [Mat4](src/mat4.rs).

0 comments on commit 0cf77cc

Please sign in to comment.