3700 FPS here we go

This commit is contained in:
Dynamitos
2021-04-25 23:43:40 +02:00
parent 312ae2af9a
commit 4a078bd24c
35 changed files with 160 additions and 73 deletions
+16
View File
@@ -3,6 +3,22 @@
using namespace Seele;
std::ostream& Seele::operator<<(std::ostream& stream, const Vector2& vector)
{
stream << "(" << vector.x << ", " << vector.y << ")";
return stream;
}
std::ostream& Seele::operator<<(std::ostream& stream, const Vector& vector)
{
stream << "(" << vector.x << ", " << vector.y << ", " << vector.z << ")";
return stream;
}
std::ostream& Seele::operator<<(std::ostream& stream, const Vector4& vector)
{
stream << "(" << vector.x << ", " << vector.y << ", " << vector.z << ", " << vector.w << ")";
return stream;
}
Vector Seele::parseVector(const char* str)
{
//regex pattern consisting of 'float3(xComp, yComp, zComp)', more also matches for invalid floats, but that will throw later
+4
View File
@@ -22,6 +22,10 @@ typedef glm::quat Quaternion;
Vector parseVector(const char*);
std::ostream& operator<<(std::ostream& stream, const Vector2& vector);
std::ostream& operator<<(std::ostream& stream, const Vector& vector);
std::ostream& operator<<(std::ostream& stream, const Vector4& vector);
static inline float square(float x)
{
return x * x;