Peano
Loading...
Searching...
No Matches
numvec.h File Reference
#include <cmath>
#include <cstdarg>
#include <cstdlib>
#include <initializer_list>
#include <iostream>
#include <lang/assert.h>
#include <lang/type.h>
Include dependency graph for numvec.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  NumVec< T, LENGTH >
 

Macros

#define SCALAR_OP(op)
 
#define VECTOR_OP(op)
 

Macro Definition Documentation

◆ SCALAR_OP

#define SCALAR_OP ( op)
Value:
NumVec operator STRCAT(op, =) (const T &scalar) { \
for (u32 i = 0; i < LENGTH; i++) { \
this->vec[i] STRCAT(op, =) scalar; \
} \
return NumVec(*this); \
} \
\
NumVec operator op (const T &scalar) const { \
return NumVec(*this) STRCAT(op, =) scalar; \
} \
#define STRCAT(a, b)
std::uint32_t u32
Definition type.h:11

Definition at line 117 of file numvec.h.

◆ VECTOR_OP

#define VECTOR_OP ( op)
Value:
NumVec operator STRCAT(op, =) (const NumVec &other) { \
for (u32 i = 0; i < LENGTH; i++) { \
this->vec[i] STRCAT(op, =) other.vec[i]; \
} \
return NumVec(*this); \
} \
\
NumVec operator op (const NumVec &other) const { \
return NumVec(*this) STRCAT(op, =) other; \
} \

Definition at line 140 of file numvec.h.