calcer 0.2.1

Calcer is a nice program to write graphs from programs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Struct som representerar en siffra, den siffran kan antingen vara ett värde eller ett x-värde
#[derive(Debug, Clone, Copy)]
pub enum Int {
    Value(f64),
    Unknown,
}

impl From<&str> for Int {
    fn from(value: &str) -> Self {
        if value == "x" {
            Self::Unknown
        } else {
            Self::Value(value.parse::<f64>().unwrap())
        }
    }
}