1 unstable release
0.1.0 | Oct 23, 2024 |
---|
#999 in Algorithms
126 downloads per month
8KB
67 lines
sykin
A library kinematic calculations using the syunit-unit-system.
Quick introduction
use syunit::prelude::*;
use sykin::prelude::*;
let distance = Millimeters(100.0);
let velocity = MMPerSecond(10.0);
// Kin1 - Only velocity and distance
assert_eq!(kin1::time_for_distance::<MetricMM>(distance, velocity), Seconds(10.0));
// Kin2 - distance, velocity and acceleration
let distance = Millimeters(15.0);
let velocity = MMPerSecond(2.0);
let acceleration = MMPerSecond2(2.0);
assert_eq!(kin2::time_for_distance::<MetricMM>(distance, velocity, acceleration), (Seconds(3.0), Seconds(-5.0)));
// ...
Dependencies
~0.4–1MB
~22K SLoC