Go to the source code of this file.
◆ vec_arithmetic
#define vec_arithmetic |
( |
|
V, |
|
|
|
S |
|
) |
| |
Value: friend V
operator-(
const V& a) {
return V(0) - a; } \
friend V
operator+(
const V& a) {
return a; } \
friend V
operator+(
const V& a,
const S& b) {
return a + V(b); } \
friend V
operator-(
const V& a,
const S& b) {
return a - V(b); } \
friend V
operator*(
const V& a,
const S& b) {
return a * V(b); } \
friend V
operator/(
const V& a,
const S& b) {
return a / V(b); } \
friend V
operator+(
const S& a,
const V& b) {
return V(a) + b; } \
friend V
operator-(
const S& a,
const V& b) {
return V(a) - b; } \
friend V
operator*(
const S& a,
const V& b) {
return V(a) * b; } \
friend V
operator/(
const S& a,
const V& b) {
return V(a) / b; } \
friend
void operator+=(V& a,
const V& b) { a = a + b; } \
friend
void operator-=(V& a,
const V& b) { a = a - b; } \
friend
void operator*=(V& a,
const V& b) { a = a * b; } \
friend
void operator/=(V& a,
const V& b) { a = a / b; } \
friend
void operator+=(V& a,
const S& b) { a = a + b; } \
friend
void operator-=(V& a,
const S& b) { a = a - b; } \
friend
void operator*=(V& a,
const S& b) { a = a * b; } \
friend
void operator/=(V& a,
const S& b) { a = a / b; }
Definition at line 7 of file L1/vectors/vec_arithmetic.h.