| Flutter Impeller |

Public Member Functions | Public Attributes | List of all members
impeller::Degrees Struct Reference

`#include <scalar.h>`

## Public Member Functions
constexpr | Degrees ()=default
constexpr | Degrees (Scalar p_degrees)
constexpr | operator Radians () const
constexpr bool | IsFinite () const
constexpr Degrees | operator- () const
constexpr Degrees | operator+ (Degrees d) const
constexpr Degrees | operator- (Degrees d) const
constexpr bool | operator> (Degrees d)
constexpr bool | operator>= (Degrees d)
constexpr bool | operator== (Degrees d)
constexpr bool | operator!= (Degrees d)
constexpr bool | operator<= (Degrees d)
constexpr bool | operator< (Degrees d)
constexpr Degrees | GetPositive () const

## Public Attributes
Scalar | degrees = 0.0

## Detailed Description

Definition at line 76 of file scalar.h.

## Constructor & Destructor Documentation

## ◆ Degrees() [1/2]

constexpr impeller::Degrees::Degrees | ( |  | ) |
| constexpr default

## ◆ Degrees() [2/2]

constexpr impeller::Degrees::Degrees | ( | Scalar | p_degrees | ) |
| inline explicit constexpr

Definition at line 81 of file scalar.h.

81 : degrees(p_degrees) {}
impeller::Degrees::degrees
Scalar degrees
Definition: scalar.h:77

## Member Function Documentation

## ◆ GetPositive()

constexpr Degrees impeller::Degrees::GetPositive | ( |  | ) | const
| inline constexpr

Definition at line 111 of file scalar.h.

111 {
112 Scalar deg = std::fmod(degrees, 360.0f);
113 if (deg < 0.0f) {
114 deg += 360.0f;
115 }
116 return Degrees{deg};
117 }
impeller::Scalar
float Scalar
Definition: scalar.h:19
impeller::Degrees::Degrees
constexpr Degrees()=default

References degrees.

Referenced by impeller::Arc::ComputeIterations(), and impeller::Arc::GetTightArcBounds().

## ◆ IsFinite()

constexpr bool impeller::Degrees::IsFinite | ( |  | ) | const
| inline constexpr

Definition at line 87 of file scalar.h.

87 { return std::isfinite(degrees); }

References degrees.

Referenced by impeller::Arc::Arc().

## ◆ operator Radians()

constexpr impeller::Degrees::operator Radians | ( |  | ) | const
| inline constexpr

Definition at line 83 of file scalar.h.

83 {
84 return Radians{degrees * kPi / 180.0f};
85 };
impeller::kPi
constexpr float kPi
Definition: constants.h:26

References degrees, and impeller::kPi.

## ◆ operator!=()

constexpr bool impeller::Degrees::operator!= | ( | Degrees | d | ) |
| inline constexpr

Definition at line 105 of file scalar.h.

105 { return degrees != d.degrees; }

References degrees.

## ◆ operator+()

constexpr Degrees impeller::Degrees::operator+ | ( | Degrees | d | ) | const
| inline constexpr

Definition at line 91 of file scalar.h.

91 {
92 return Degrees{degrees + d.degrees};
93 }

References degrees.

## ◆ operator-() [1/2]

constexpr Degrees impeller::Degrees::operator- | ( |  | ) | const
| inline constexpr

Definition at line 89 of file scalar.h.

89 { return Degrees{-degrees}; }

References degrees.

## ◆ operator-() [2/2]

constexpr Degrees impeller::Degrees::operator- | ( | Degrees | d | ) | const
| inline constexpr

Definition at line 95 of file scalar.h.

95 {
96 return Degrees{degrees - d.degrees};
97 }

References degrees.

## ◆ operator<()

constexpr bool impeller::Degrees::operator< | ( | Degrees | d | ) |
| inline constexpr

Definition at line 109 of file scalar.h.

109 { return degrees < d.degrees; }

References degrees.

## ◆ operator<=()

constexpr bool impeller::Degrees::operator<= | ( | Degrees | d | ) |
| inline constexpr

Definition at line 107 of file scalar.h.

107 { return degrees <= d.degrees; }

References degrees.

## ◆ operator==()

constexpr bool impeller::Degrees::operator== | ( | Degrees | d | ) |
| inline constexpr

Definition at line 103 of file scalar.h.

103 { return degrees == d.degrees; }

References degrees.

## ◆ operator>()

constexpr bool impeller::Degrees::operator> | ( | Degrees | d | ) |
| inline constexpr

Definition at line 99 of file scalar.h.

99 { return degrees > d.degrees; }

References degrees.

## ◆ operator>=()

constexpr bool impeller::Degrees::operator>= | ( | Degrees | d | ) |
| inline constexpr

Definition at line 101 of file scalar.h.

101 { return degrees >= d.degrees; }

References degrees.

## Member Data Documentation

## ◆ degrees

Scalar impeller::Degrees::degrees = 0.0

Definition at line 77 of file scalar.h.

Referenced by impeller::interop::PathBuilder::AddArc(), impeller::Arc::Arc(), impeller::Arc::ComputeIterations(), GetPositive(), impeller::Arc::GetTightArcBounds(), IsFinite(), impeller::Arc::IsFullCircle(), operator Radians(), operator!=(), operator+(), operator-(), operator<(), std::operator<<(), operator<=(), operator==(), operator>(), operator>=(), impeller::interop::DisplayListBuilder::Rotate(), impeller::SweepGradientContents::SetCenterAndAngles(), impeller::testing::TEST(), and impeller::testing::TEST_P().

The documentation for this struct was generated from the following file:

- impeller/geometry/scalar.h