Struct siege_math::angle::Angle [] [src]

#[repr(C)]
pub struct Angle<F>(_);

A type for representing an angle, without needing to remember if it is denominated in Radians, Degrees, or otherwise.

Methods

impl<F: FullFloat> Angle<F>
[src]

[src]

Create an angle from radians

[src]

Create an angle from radians

[src]

Get the value of the angle as radians

[src]

Create an angle from degrees

[src]

Create an angle from degrees

[src]

Get the value of the angle as degrees

[src]

Create an angle from cycles (1 cycle is a full circle)

[src]

Create an angle from cycles (1 cycle is a full circle)

[src]

Get the value of the angle as number of cycles (full circles)

[src]

Get the angle that a given vector points in relative to the x-axis and going counterclockwise. This ranges from -PI to PI, and all 4 quadrants are properly handled.

Trait Implementations

impl<F: Debug> Debug for Angle<F>
[src]

[src]

Formats the value using the given formatter. Read more

impl<F: Clone> Clone for Angle<F>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<F: Copy> Copy for Angle<F>
[src]

impl<F: PartialEq> PartialEq for Angle<F>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<F: Eq> Eq for Angle<F>
[src]

impl<F: Hash> Hash for Angle<F>
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<F: PartialOrd> PartialOrd for Angle<F>
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<F: Ord> Ord for Angle<F>
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl<F: FullFloat> Mul<F> for Angle<F>
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<F: FullFloat> Div<F> for Angle<F>
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<F: FullFloat> Add<Angle<F>> for Angle<F>
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<F: FullFloat> Sub<Angle<F>> for Angle<F>
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<F: FullFloat> Neg for Angle<F>
[src]

The resulting type after applying the - operator.

[src]

Performs the unary - operation.

impl<F: FullFloat> ApproxEq for Angle<F>
[src]

[src]

This method tests for self and other values to be approximately equal using two methods: epsilon and ulps. If the values differ by less than the given epsilon, they will be considered equal. If the values differ by more than epsilon, but by less than the given ulps, they will also be considered equal. Otherwise they are unequal. Read more

[src]

This method tests for self and other values to be not approximately equal using two methods: epsilon and ulps. If the values differ by less than the given epsilon, they will be considered equal. If the values differ by more than epsilon, but by less than the given ulps, they will also be considered equal. Otherwise they are unequal. Read more

Auto Trait Implementations

impl<F> Send for Angle<F> where
    F: Send

impl<F> Sync for Angle<F> where
    F: Sync