5#ifndef FLUTTER_IMPELLER_GEOMETRY_HALF_H_
6#define FLUTTER_IMPELLER_GEOMETRY_HALF_H_
10#include "flutter/fml/build_config.h"
19#if defined(FML_OS_MACOSX) || defined(FML_OS_IOS) || \
20 defined(FML_OS_IOS_SIMULATOR)
92 return v.
x ==
x && v.
y ==
y && v.
z ==
z && v.
w ==
w;
96 return v.
x !=
x || v.
y !=
y || v.
z !=
z || v.
w !=
w;
120 return v.
x ==
x && v.
y ==
y && v.
z ==
z;
124 return v.
x !=
x || v.
y !=
y || v.
z !=
z;
146 return v.
x ==
x && v.
y ==
y;
150 return v.
x !=
x || v.
y !=
y;
154static_assert(
sizeof(Half) ==
sizeof(uint16_t));
155static_assert(
sizeof(HalfVector2) == 2 *
sizeof(Half));
156static_assert(
sizeof(HalfVector3) == 3 *
sizeof(Half));
157static_assert(
sizeof(HalfVector4) == 4 *
sizeof(Half));
constexpr InternalHalf ScalarToHalf(Scalar f)
Convert a scalar to a half precision float.
std::ostream & operator<<(std::ostream &out, const impeller::Color &c)
A storage only class for half precision floating point vector 2.
constexpr bool operator==(const HalfVector2 &v) const
constexpr HalfVector2(const Vector2 &a)
constexpr HalfVector2(InternalHalf x, InternalHalf y)
constexpr bool operator!=(const HalfVector2 &v) const
A storage only class for half precision floating point vector 3.
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
A storage only class for half precision floating point vector 4.
constexpr bool operator==(const HalfVector4 &v) const
constexpr HalfVector4(const Color &a)
constexpr HalfVector4(const Vector4 &a)
constexpr bool operator!=(const HalfVector4 &v) const
constexpr HalfVector4(InternalHalf x, InternalHalf y, InternalHalf z, InternalHalf w)
A storage only class for half precision floating point.
constexpr bool operator==(const Half &v) const
constexpr Half(Scalar value)
constexpr Half(InternalHalf x)
constexpr bool operator!=(const Half &v) const
constexpr Half(double value)
constexpr Half(int value)