From d24fc1baf6b5d19c937b348e9d1817d7c640ec3a Mon Sep 17 00:00:00 2001 From: Giona Imperatori Date: Tue, 31 Oct 2023 21:09:11 +0100 Subject: [PATCH] docs(README): added unit conversion example --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 47e65aa2..ec35f788 100644 --- a/README.md +++ b/README.md @@ -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::(); } fn calc_acceleration(velocity: Velocity, time: Time) -> Acceleration {