alloy::math

Trait FromUnit

source
pub trait FromUnit: Sealed {
    // Required method
    fn from_unit(angle: Unit) -> Self;
}
Expand description

A closed trait used to enable conversions of Unit angle representations into Angle types.

This is a requirement for being able to generically define angular conversions.

Note: This may become unsealed in a future update

Required Methods§

source

fn from_unit(angle: Unit) -> Self

Converts the Unit angle into the new Angle type

§Parameters
  • angle - the Unit angle to convert

Object Safety§

This trait is not object safe.

Implementors§