Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Tehforsch committed Feb 25, 2024
1 parent afa28ac commit 98dffc8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! ```
//! # #![feature(generic_const_exprs)]
//! use diman::si::dimensions::{Length, Time, Velocity};
//! use diman::si::units::{seconds, meters, kilometers, hours};
//! use diman::si::units::{seconds, meters, kilometers, hours, hour};
//!
//! fn get_velocity(x: Length<f64>, t: Time<f64>) -> Velocity<f64> {
//! x / t
Expand All @@ -13,9 +13,10 @@
//! let v2 = get_velocity(10.0 * meters, 1.0 * seconds);
//!
//! assert_eq!(v1, v2);
//! assert_eq!(format!("{} km/h", v1.value_in(kilometers / hour)), "36 km/h");
//! ```
//!
//! Let's try to add quantities with incompatible dimensions:
//! Diman prevents unit errors at compile time:
//! ```compile_fail
//! # use diman::si::units::{seconds, meters};
//! let time = 1.0 * seconds;
Expand Down

0 comments on commit 98dffc8

Please sign in to comment.