fixing stuff

This commit is contained in:
Daniel Ledda
2025-01-03 19:21:18 +01:00
parent 3430b4e69a
commit 256292c20d
47 changed files with 3401 additions and 6901 deletions

View File

@@ -1,11 +1,8 @@
#include <cstdint>
#include <glm/ext/vector_float3.hpp>
#include <string>
#include <math.h>
#include <iostream>
#include "Color.h"
#include "../lib/djstdlib/core.h"
auto hue_to_rgb(float p, float q, float t) -> float {
real32 hue_to_rgb(float p, float q, float t) {
if (t < 0) {
t += 1;
} else if (t > 1) {
@@ -17,7 +14,7 @@ auto hue_to_rgb(float p, float q, float t) -> float {
return p;
};
auto hsl_to_hex(float h, float s, float l) -> glm::vec3 {
glm::vec3 hsl_to_hex(real32 h, real32 s, real32 l) {
h /= 360;
s /= 100;
l /= 100;
@@ -34,7 +31,7 @@ auto hsl_to_hex(float h, float s, float l) -> glm::vec3 {
return glm::vec3(r, g, b);
}
auto Color::color_from_index(int index) -> glm::vec3 {
glm::vec3 color_from_index(int index) {
auto color_wheel_cycle = floorf(index / 6.0f);
auto darkness_cycle = floorf(index / 12.0f);
auto spacing = (360.0f / 6.0f);