10struct quadruple_type :
11 public sequence_type < NUMBER, 4 >
15 using UNIT_TYPE = NUMBER;
41 quadruple_type(UNIT_TYPE n)
51 quadruple_type(UNIT_TYPE a, UNIT_TYPE b, UNIT_TYPE c = 0, UNIT_TYPE d = 0) :
52 sequence_type < UNIT_TYPE, 4 >(a, b, c, d)
56 template < prototype_number NUMBER1 >
57 quadruple_type(
const sequence_type < NUMBER1, 4 > & sequence) :
58 sequence_type < UNIT_TYPE, 4 >(sequence)
77 quadruple_type & operator =(
const quadruple_type & v) =
default;
81 inline quadruple_type operator *(UNIT_TYPE n)
const
83 return quadruple_type(this->x * n, this->y * n, this->z * n, this->w * n);
86 inline quadruple_type operator /(UNIT_TYPE n)
const
88 return quadruple_type(this->x / n, this->y / n, this->z / n, this->w / n);
91 inline quadruple_type operator +(
const quadruple_type & q)
const
93 return quadruple_type(this->x + q.x, this->y + q.y, this->z + q.z, this->w + q.w);
96 inline quadruple_type operator -(
const quadruple_type & t)
const
98 return quadruple_type(this->x - t.x, this->y - t.y, this->z - t.z, this->w - t.w);
101 inline quadruple_type & operator +=(
const quadruple_type & a)
107 inline quadruple_type & operator -=(
const quadruple_type & a)
126inline quadruple_type < largest_number < NUMBER1, NUMBER2 > > operator * (NUMBER1 n,
const quadruple_type < NUMBER2 > & q)
129 return quadruple_type < largest_number < NUMBER1, NUMBER2 > >(n * q.x, n * q.y, n * q.z, n * q.w);