14 template <
typename Type>
21 Couple(Type val_1, Type val_2)
27 void Set(Type val_1, Type val_2)
29 data_ = { val_1, val_2 };
35 return data_[0] == value || data_[1] == value;
76 for (
auto val : data_)
95 for (
auto &data : this->data_)
105 for (
auto &data : this->data_)
113 std::array<Type, 2> data_;
const Type & GetFirst() const
Returns the first value.
Definition: Couple.h:50
bool operator==(const Couple< Type > &other)
Compares two couples. The order of values is not important.
Definition: Couple.h:74
Structure holding two variables of the same type.
Definition: Couple.h:15
Type & operator[](size_t idx)
Returns reference to the value by a specified index.
Definition: Couple.h:39
void SetSecond(Type value)
Sets the second value.
Definition: Couple.h:68
const Type & GetSecond() const
Returns the second value.
Definition: Couple.h:62
bool operator!=(const Couple< Type > &other)
Compares two couples. The order of values is not important.
Definition: Couple.h:87
Couple & operator+=(const Type val)
Increases both values by a specific amount.
Definition: Couple.h:93
void SetFirst(Type value)
Sets the first value.
Definition: Couple.h:56
General namespace for utilities.
Definition: BulletConversions.h:9
bool Contains(const Type value) const
Checks if at least one of the two is equal to the value.
Definition: Couple.h:33
void Set(Type val_1, Type val_2)
Sets values.
Definition: Couple.h:27
Couple & operator*=(const Type val)
Multiples both values with a specific value.
Definition: Couple.h:103