Crates.io | sykin |
lib.rs | sykin |
version | 0.1.0 |
source | src |
created_at | 2024-10-23 12:31:13.102595 |
updated_at | 2024-10-23 12:31:13.102595 |
description | A library kinematic calculations using the syunit-unit-system |
homepage | |
repository | https://github.com/SamuelNoesslboeck/sykin |
max_upload_size | |
id | 1420020 |
size | 12,509 |
A library kinematic calculations using the syunit-unit-system.
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)));
// ...