carlo 0.5.1

A simple interpreted programming language.
Documentation
//! Defines units and prefixes.

/// Defines the units available to the Carlo language.
/// Each unit is structured as (name, (multiplier, kg, m, s, A, K, mol))
pub const UNITS: [(&str, (f64, f64, f64, f64, f64, f64, f64)); 16] = [
    ("g", (0.001, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0)),
    ("m", (1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0)),
    ("s", (1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0)),
    ("N", (1.0, 1.0, 1.0, -2.0, 0.0, 0.0, 0.0)),
    ("Pa", (1.0, 1.0, -1.0, -2.0, 0.0, 0.0, 0.0)),
    ("L", (0.001, 0.0, 3.0, 0.0, 0.0, 0.0, 0.0)),
    ("Hz", (1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0)),
    ("J", (1.0, 1.0, 2.0, -2.0, 0.0, 0.0, 0.0)),
    ("W", (1.0, 1.0, 2.0, -3.0, 0.0, 0.0, 0.0)),
    ("A", (1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0)),
    ("C", (1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0)),
    ("V", (1.0, 1.0, 2.0, -3.0, -1.0, 0.0, 0.0)),
    ("O", (1.0, 1.0, 2.0, -3.0, -2.0, 0.0, 0.0)),
    ("F", (1.0, -1.0, -2.0, 4.0, 2.0, 0.0, 0.0)),
    ("K", (1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0)),
    ("mol", (1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0)),
];

/// Defines the prefixes available to the Carlo language.
pub const PREFIXES: [(char, f64); 7] = [
    ('n', 1E-9),
    ('u', 1E-6),
    ('m', 1E-3),
    ('c', 1E-2),
    ('k', 1E+3),
    ('M', 1E+6),
    ('G', 1E+9),
];