Trait CoordinateSystem

Source
pub trait CoordinateSystem: Sized {
    type Dimension: Unsigned + ArrayLength<f64> + ArrayLength<usize>;

    // Provided methods
    fn small(_: &Point<Self>) -> f64 { ... }
    fn dimension() -> usize { ... }
}
Expand description

CoordinateSystem marks a struct (usually a unit struct) as representing a coordinate system.

Required Associated Types§

Source

type Dimension: Unsigned + ArrayLength<f64> + ArrayLength<usize>

An associated type representing the dimension of the coordinate system

Provided Methods§

Source

fn small(_: &Point<Self>) -> f64

Function returning a small value for purposes of numerical differentiation. What is considered a small value may depend on the point, hence the parameter. Returns just 0.01 by default.

Source

fn dimension() -> usize

Function returning the dimension

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§