6template <
typename T>
struct vec3 {
12 constexpr vec3() =
default;
15 template <
typename U>
explicit constexpr vec3(U xyz) :
x(xyz),
y(xyz),
z(xyz) {}
121 return (
x ==
p.x &&
y ==
p.y &&
z ==
p.z);
125 return (
x !=
p.x ||
y !=
p.y ||
z !=
p.z);
133 return vec3<U>(
static_cast<U
>(
x),
static_cast<U
>(
y),
static_cast<U
>(
z));
148 return sqrt(dx * dx + dy * dy + dz * dz);
151 bool is_zero()
const {
return (
x == 0 &&
y == 0 &&
z == 0); }
static FASTLED_NAMESPACE_BEGIN uint8_t const p[]
bool operator!=(const vec3< U > &p) const
vec3 & operator/=(const vec3 &p)
vec3 operator-(const NumberT &p) const
bool operator==(const vec3 &p) const
vec3 operator-(const vec3 &p) const
vec3 operator+(const vec3< U > &p) const
constexpr vec3(T x, T y, T z)
constexpr vec3(const vec3 &p)
vec3 getMax(const vec3 &p) const
vec3 operator/(const vec3 &p) const
bool operator!=(const vec3 &p) const
vec3 & operator/=(const int &d)
vec3 getMin(const vec3< U > &p) const
vec3 & operator+=(const vec3 &p)
vec3 getMin(const vec3 &p) const
vec3 operator/(const NumberT &p) const
vec3 & operator-=(const vec3 &p)
T distance(const vec3 &p) const
vec3 getMax(const vec3< U > &p) const
vec3 & operator=(const vec3 &p)
vec3 operator+(const NumberT &p) const
vec3 operator*(const vec3 &p) const
vec3 & operator*=(const double &f)
vec3 & operator*=(const float &f)
vec3 operator+(const vec3 &p) const
vec3 & operator/=(const float &f)
vec3 operator*(const NumberT &p) const
vec3 & operator/=(const double &f)
vec3 & operator/=(const uint16_t &d)
bool operator==(const vec3< U > &p) const