gb
gb copied to clipboard
gb single-file public domain libraries for C & C++
`gb_remainder` uses `round`. this is bad, because it means `gb_remainder(1.5, 2.0)` = `-0.5`, and `gb_mod(2.5, 2.0)` = `2.5`. this is contrary to how the C standard library `modf` / `remainder`...
By mistake I've passed 45.0f to `gb_mat4_perspective` and everything was looking fine. But when I've enabled `GB_MATH_NO_MATH_H` suddenly nothing worked anymore. Apparently tanf does some wrap arounds inside, and current...
At https://github.com/gingerBill/gb/blob/master/gb.h#L207, there is a check for if __GNUC__ is defined, and if so the compiler is marked as gcc. However, clang also defines the __GNUC__ macro and so is...
I was looking over the various math functions and noticed that there is a lot of error in the implementation of the Logarithm and Exponential functions. This is after applying...
Hello! I am not a pro at setting up my C environment and am spoiled by all in one IDEs. When I try to #include "gb.h" I get an error...
This is a demo, vs2017 is ok. ` #define GB_IMPLEMENTATION #include "gb.h" #include int main(int argc, char **argv) { gbAllocator allocator = gb_heap_allocator(); gbString str = gb_string_make(allocator ,"Hello"); gbString other_str...
https://github.com/gingerBill/gb/blob/master/gb.h#L7957-L7959 Pretty sure this always produces incorrect results since libc functions return 0 on success.
Hey, as I'm continue to develop a game based on gb_math, I find that rect unions are pretty much quite useful. Would be nice to have them in standard gb_math....
The byte 0x80 is no a valid utf-8 but the function doen't return GB_RUNE_INVALID
Reading gb_math.h source sometimes is really confusing. Usual math notation for matrix is Aij where i is row and j is column: A00 A01 A02 A03 A10 A11 A12 A13...