The comment about nuklear's math functions in the SDL3 demo could be misleading:
|
/* SDL can also provide us with math functions, but beware that Nuklear's own |
|
* implementation can be slightly faster at the cost of some precision */ |
|
#define NK_INV_SQRT(f) (1.0f / SDL_sqrtf(f)) |
|
#define NK_SIN(f) SDL_sinf(f) |
|
#define NK_COS(f) SDL_cosf(f) |
The nuklear math functions were tailored for internal use only, since "nuklear only needs sine and cosine to generate circles" as documented in nuklear_math.c.
This comment might suggest that nuklear's implementations are a faster replacement for general purpose math?
See #960 for context.
The comment about nuklear's math functions in the SDL3 demo could be misleading:
Nuklear/demo/sdl3_renderer/main.c
Lines 80 to 84 in e5a3839
The nuklear math functions were tailored for internal use only, since "nuklear only needs sine and cosine to generate circles" as documented in
nuklear_math.c.This comment might suggest that nuklear's implementations are a faster replacement for general purpose math?
See #960 for context.