absrel idea
This commit is contained in:
parent
438d0ec6ec
commit
5e32fbe4ae
6
absrel/Cargo.toml
Normal file
6
absrel/Cargo.toml
Normal file
@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "absrel"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
3
absrel/src/abs.rs
Normal file
3
absrel/src/abs.rs
Normal file
@ -0,0 +1,3 @@
|
||||
/// This type represents an absolute value, such as a coordinate for a world position.
|
||||
/// This is called a euclidean point in Geometric Algebra.
|
||||
pub struct Absolute<T>(T);
|
2
absrel/src/lib.rs
Normal file
2
absrel/src/lib.rs
Normal file
@ -0,0 +1,2 @@
|
||||
pub mod abs;
|
||||
pub mod rel;
|
7
absrel/src/rel.rs
Normal file
7
absrel/src/rel.rs
Normal file
@ -0,0 +1,7 @@
|
||||
/// This type represents the difference between two absolute values.
|
||||
/// This is called an ideal point in Geometric Algebra.
|
||||
/// After you get your time delta or position delta,
|
||||
/// implement your number-crunching logic using this type.
|
||||
/// Once the calculation is complete, it can be added to an absolute value
|
||||
/// with the effect of offsetting the value to a new absolute value.
|
||||
pub struct Relative<T>(T);
|
Loading…
Reference in New Issue
Block a user