Angle class abstract
The <angle> CSS data type represents an angle value expressed in
degrees, gradians, radians, or turns. It is used by CSS functions like
rotate() and in gradient angles.
Positive numbers represent clockwise angles; negative numbers represent
counter-clockwise angles. Common units are deg, rad, and turn.
Examples (CSS): 90deg, 3.1416rad, 0.25turn.
Read more: MDN <angle>
Constructors
- Angle.deg(double value)
-
Constructs an Angle in degrees (
<number>deg).constfactory - Angle.rad(double value)
-
Constructs an Angle in radians (
<number>rad).constfactory - Angle.turn(double value)
-
Constructs an Angle in turns (
<number>turn). One full circle is1turn.constfactory - Angle.variable(String value)
-
Constructs an Angle from a CSS variable reference:
var(--name).constfactory
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator +(
Angle other) → Angle -
Adds two angles. If both angles use the same unit the result may be
combined; otherwise a CSS
calc()expression will be produced. -
operator ==(
Object other) → bool -
The equality operator.
inherited