OSu8tof32

C Specification


#include <revolution/os.h>

inline void OSu8tof32(u8* in, f32* out);

Arguments

in Pointer to the unsigned 8-bit integer value to convert.
out Pointer to a 32-bit floating point value to store.

Return Values

None.

Description

Fast converts an unsigned 8-bit integer into a 32-bit floating value in two cycles (using a load and store).

The OSInitFastCast must be called before 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.

See Also

OSInitFastCast, OSf32tos16, OSf32tos8, OSf32tou16, OSf32tou8, OSs16tof32, OSs8tof32, OSu16tof32, OSu8tof32

Revision History

03/01/2006 Initial version.