sykin

Crates.iosykin
lib.rssykin
version0.1.0
sourcesrc
created_at2024-10-23 12:31:13.102595
updated_at2024-10-23 12:31:13.102595
descriptionA library kinematic calculations using the syunit-unit-system
homepage
repositoryhttps://github.com/SamuelNoesslboeck/sykin
max_upload_size
id1420020
size12,509
Samuel Nösslböck (SamuelNoesslboeck)

documentation

README

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)));

// ...
Commit count: 9

cargo fmt