Trait cgmath::Rotation2

source ·
pub trait Rotation2: Rotation<Space = Point2<Self::Scalar>> + Into<Matrix2<Self::Scalar>> + Into<Basis2<Self::Scalar>> {
    type Scalar: BaseFloat;

    // Required method
    fn from_angle<A: Into<Rad<Self::Scalar>>>(theta: A) -> Self;
}
Expand description

A two-dimensional rotation.

Required Associated Types§

Required Methods§

source

fn from_angle<A: Into<Rad<Self::Scalar>>>(theta: A) -> Self

Create a rotation by a given angle. Thus is a redundant case of both from_axis_angle() and from_euler() for 2D space.

Implementors§

source§

impl<S: BaseFloat> Rotation2 for Basis2<S>

§

type Scalar = S