Trait ring360::ToRing360

source ·
pub trait ToRing360 {
    // Required methods
    fn to_360(&self) -> Ring360;
    fn to_360_gis(&self) -> Ring360;
    fn mod_360(&self) -> Self;
    fn angle_360(&self, other_value: f64) -> Self;
    fn angle_360_abs(&self, other_value: f64) -> Self;
}
Expand description

trait to convert normal float values to a Ring360 value and to apply a simple mod_360() returning a 64-bit float

Required Methods§

source

fn to_360(&self) -> Ring360

source

fn to_360_gis(&self) -> Ring360

source

fn mod_360(&self) -> Self

source

fn angle_360(&self, other_value: f64) -> Self

source

fn angle_360_abs(&self, other_value: f64) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ToRing360 for f64

Implement casting methods for f64

source§

fn to_360(&self) -> Ring360

Convert to a Ring360 struct

source§

fn to_360_gis(&self) -> Ring360

Convert to GIS ±180 representation

source§

fn mod_360(&self) -> f64

Convert a 64-bit float directly to the 0 to 360º system

source§

fn angle_360(&self, other_value: f64) -> f64

Calculate the shortest relative angle with another 64-bit float in the 0 to 360º system with negative values indicating an anticlockwise direction

source§

fn angle_360_abs(&self, other_value: f64) -> f64

Calculate the absolute angle with another 64-bit float in the 0 to 360º system only in a clockwise direction with the 180º to 359.999º representing half to a full turn

Implementors§