#include <revolution/os.h> inline void OSu8tof32(u8* in, f32* out);
| in | Pointer to the unsigned 8-bit integer value to be converted. |
|---|---|
out |
Pointer to the 32-bit floating point value to be stored. |
None.
Fast converts an unsigned 8-bit integer into a 32-bit floating value in two cycles (using a load and store).
Be aware that the OSInitFastCast function must be called prior to invoking this function.
In the standard debug builds, this function and all other fast cast functions will not be inline-expanded.
This function takes addresses as arguments to load/store instructions. Taking addresses as arguments ensures that the compiler will reserve space on the stack (rather than forcing the programmer or the inline function to allocate space). The stack-allocated variables will likely be in the cache.
OSInitFastCast, OSf32tos16, OSf32tos8, OSf32tou16, OSf32tou8, OSs16tof32, OSs8tof32, OSu16tof32
2006/03/01 Initial version.
CONFIDENTIAL