oxictl 0.1.1

Pure Rust Real-Time Control Systems Framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/// Errors that can occur in fixed-point arithmetic.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum FixedError {
    /// Division by zero attempted.
    DivByZero,
    /// Result overflowed the representable range.
    Overflow,
}

impl core::fmt::Display for FixedError {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        match self {
            FixedError::DivByZero => f.write_str("fixed-point division by zero"),
            FixedError::Overflow => f.write_str("fixed-point arithmetic overflow"),
        }
    }
}