| Flutter Impeller |

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

A storage only class for half precision floating point vector 3. More...

`#include <half.h>`

## Public Member Functions
constexpr | HalfVector3 ()
constexpr | HalfVector3 (const Vector3 &a)
constexpr | HalfVector3 (InternalHalf x, InternalHalf y, InternalHalf z)
constexpr bool | operator== (const HalfVector3 &v) const
constexpr bool | operator!= (const HalfVector3 &v) const

## Public Attributes
union {
struct {
InternalHalf x = 0
InternalHalf y = 0
InternalHalf z = 0
} |
InternalHalf e [3]
}; |

## Detailed Description

A storage only class for half precision floating point vector 3.

Definition at line 99 of file half.h.

## Constructor & Destructor Documentation

## ◆ HalfVector3() [1/3]

constexpr impeller::HalfVector3::HalfVector3 | ( |  | ) |
| inlineconstexpr

Definition at line 109 of file half.h.

109 {}

## ◆ HalfVector3() [2/3]

constexpr impeller::HalfVector3::HalfVector3 | ( | const Vector3 & | a | ) |
| inlineconstexpr

Definition at line 111 of file half.h.

112 : x(ScalarToHalf(a.x)), y(ScalarToHalf(a.y)), z(ScalarToHalf(a.z)) {}
impeller::ScalarToHalf
constexpr InternalHalf ScalarToHalf(Scalar f)
Convert a scalar to a half precision float.
Definition: half.h:32
impeller::HalfVector3::x
InternalHalf x
Definition: half.h:102
impeller::HalfVector3::z
InternalHalf z
Definition: half.h:104
impeller::HalfVector3::y
InternalHalf y
Definition: half.h:103

## ◆ HalfVector3() [3/3]

constexpr impeller::HalfVector3::HalfVector3 | ( | InternalHalf | x,
|  | InternalHalf | y,
|  | InternalHalf | z
| ) |  |
| inlineconstexpr

Definition at line 114 of file half.h.

115 : x(x), y(y), z(z) {}

## Member Function Documentation

## ◆ operator!=()

constexpr bool impeller::HalfVector3::operator!= | ( | const HalfVector3 & | v | ) | const
| inlineconstexpr

Definition at line 121 of file half.h.

121 {
122 return v.x != x || v.y != y || v.z != z;
123 }

References x, y, and z.

## ◆ operator==()

constexpr bool impeller::HalfVector3::operator== | ( | const HalfVector3 & | v | ) | const
| inlineconstexpr

Definition at line 117 of file half.h.

117 {
118 return v.x == x && v.y == y && v.z == z;
119 }

References x, y, and z.

## Member Data Documentation

## ◆

union { ... }

## ◆ e

InternalHalf impeller::HalfVector3::e[3]

Definition at line 106 of file half.h.

## ◆ x

InternalHalf impeller::HalfVector3::x = 0

Definition at line 102 of file half.h.

Referenced by operator!=(), std::operator<<(), and operator==().

## ◆ y

InternalHalf impeller::HalfVector3::y = 0

Definition at line 103 of file half.h.

Referenced by operator!=(), std::operator<<(), and operator==().

## ◆ z

InternalHalf impeller::HalfVector3::z = 0

Definition at line 104 of file half.h.

Referenced by operator!=(), std::operator<<(), and operator==().

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

- impeller/geometry/half.h