Skip to content

Commit

Permalink
Merge pull request iliekturtles#445 from igiona/igiona-patch-1
Browse files Browse the repository at this point in the history
docs(README): added unit conversion example
  • Loading branch information
iliekturtles authored Jan 19, 2024
2 parents 629f385 + d24fc1b commit 85b665e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ fn main() {
let velocity/*: Velocity*/ = length / time;
let _acceleration = calc_acceleration(velocity, time);
//let error = length + time; // error[E0308]: mismatched types

// Get a quantity value in a specific unit.
let time_in_nano_seconds = time.get::<uom::si::time::nanosecond>();
}

fn calc_acceleration(velocity: Velocity, time: Time) -> Acceleration {
Expand Down

0 comments on commit 85b665e

Please sign in to comment.