linux build

This commit is contained in:
Daniel Ledda
2025-01-07 10:29:07 +01:00
parent 6872ebf418
commit b84b59df09
4 changed files with 13 additions and 7 deletions

View File

@@ -1,7 +1,6 @@
#include <iostream>
#include <ostream>
#include <math.h>
#include <string.h>
#include <unistd.h>
#include "core.h"
#include "os.cpp"
#define STB_SPRINTF_IMPLEMENTATION
@@ -298,6 +297,7 @@ real32 parsePositiveReal32(string str, size_t *lengthPointer) {
*lengthPointer += 1;
int fractionalPart = parsePositiveInt(fractionalPartStr, lengthPointer);
if (wholePart >= 0 && fractionalPart >= 0) {
// TODO(dledda): implement powf with intrinsics? or just custom
real32 fractionalPartMultiplier = 1.0f / powf(10.0f, (real32)fractionalPartStr.length);
result = (real32)wholePart + (real32)fractionalPart * (real32)fractionalPartMultiplier;
}