transforms 2.0.0-alpha.1

A transform library to track reference frames and provide transforms between them.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use thiserror::Error;

/// Error type for quaternion operations.
#[derive(Error, Debug)]
#[non_exhaustive]
pub enum QuaternionError {
    /// The divisor quaternion has (near-)zero norm.
    #[error("division by zero quaternion")]
    DivisionByZero,
    /// The quaternion has (near-)zero norm and cannot be normalized.
    #[error("cannot normalize a zero-length quaternion")]
    ZeroLengthNormalization,
    /// The quaternion has non-finite (NaN or infinite) components.
    #[error("quaternion has non-finite components")]
    NonFinite,
}