Crates.io | ordo |
lib.rs | ordo |
version | 0.1.1 |
source | src |
created_at | 2021-09-20 04:26:26.832561 |
updated_at | 2021-09-22 22:58:57.231699 |
description | Latin language utility library for Rust. |
homepage | |
repository | https://github.com/donmccaughey/ordo |
max_upload_size | |
id | 453828 |
size | 20,488 |
Latin language utility library for Rust.
Numerus
structNumeri are integer Roman numbers in the inclusive range 1..=3999
. Like other Rust integers,
math operations on Numeri will panic on overflow in debug builds.
use ordo::Numerus;
let xlii = Numerus::try_from(42).unwrap();
let ix = Numerus::try_from(9).unwrap();
let xxxiii = xlii - ix;
println!("The answer is {}", xxxiii);
// prints "XXXIII"
ordo
is made available under a BSD-style license; see the LICENSE
file for
details.