chore: initial commit

This commit is contained in:
fallenoak 2020-11-22 23:25:22 -06:00
commit c955dd6531
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
16 changed files with 18109 additions and 0 deletions

13
tempest/CMakeLists.txt Normal file
View file

@ -0,0 +1,13 @@
file(GLOB TEMPEST_SOURCES
"*.cpp"
"vector/*.cpp"
)
add_library(tempest STATIC
${TEMPEST_SOURCES}
)
target_include_directories(tempest
PUBLIC
${PROJECT_SOURCE_DIR}
)

6
tempest/Vector.hpp Normal file
View file

@ -0,0 +1,6 @@
#ifndef TEMPEST_VECTOR_HPP
#define TEMPEST_VECTOR_HPP
#include "tempest/vector/C3Vector.hpp"
#endif

View file

@ -0,0 +1,13 @@
#include "tempest/vector/C3Vector.hpp"
C3Vector& C3Vector::operator*=(float a) {
this->x *= a;
this->y *= a;
this->z *= a;
return *this;
}
float C3Vector::SquaredMag() const {
return this->x * this->x + this->y * this->y + this->z * this->z;
}

View file

@ -0,0 +1,21 @@
#ifndef TEMPEST_VECTOR_C_3VECTOR_HPP
#define TEMPEST_VECTOR_C_3VECTOR_HPP
class C3Vector {
public:
// Member variables
float x = 0.0f;
float y = 0.0f;
float z = 0.0f;
// Member functions
C3Vector() = default;
C3Vector(float x, float y, float z)
: x(x)
, y(y)
, z(z){};
C3Vector& operator*=(float a);
float SquaredMag() const;
};
#endif