Enum style::values::computed::angle::Angle [] [src]

pub enum Angle {
    Deg(CSSFloat),
    Grad(CSSFloat),
    Rad(CSSFloat),
    Turn(CSSFloat),
}

A computed angle.

Variants

An angle with degree unit.

An angle with gradian unit.

An angle with radian unit.

An angle with turn unit.

Methods

impl Angle
[src]

[src]

Creates a computed Angle value from a radian amount.

[src]

Returns the amount of radians this angle represents.

[src]

Returns the amount of radians this angle represents as a f64.

Gecko stores angles as singles, but does this computation using doubles. See nsCSSValue::GetAngleValueInRadians. This is significant enough to mess up rounding to the nearest quarter-turn for 225 degrees, for example.

Trait Implementations

impl AnimatedValueAsComputed for ComputedAngle
[src]

impl Animate for Angle
[src]

[src]

Animate a value towards another one, given an animation procedure.

impl Clone for Angle
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Angle
[src]

impl Debug for Angle
[src]

[src]

Formats the value using the given formatter. Read more

impl MallocSizeOf for Angle
[src]

[src]

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more

impl PartialEq for Angle
[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 ToCss for Angle
[src]

[src]

Serialize self in CSS syntax, writing to dest.

[src]

Serialize self in CSS syntax and return a string. Read more

impl PartialOrd for Angle
[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 ToAnimatedZero for Angle
[src]

[src]

Returns a value that, when added with an underlying value, will produce the underlying value. This is used for SMIL animation's "by-animation" where SMIL first interpolates from the zero value to the 'by' value, and then adds the result to the underlying value. Read more

impl AsRef<Angle> for Angle
[src]

Important traits for &'a mut W
[src]

Performs the conversion.

impl Add for Angle
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Zero for Angle
[src]

[src]

Returns the additive identity element of Self, 0. Read more

[src]

Returns true if self is equal to the additive identity.

impl ComputeSquaredDistance for Angle
[src]

[src]

Computes the squared distance between two animatable values.

impl AsRef<ComputedAngle> for Angle
[src]

[src]

Performs the conversion.