OSs8tof32

Syntax

#include <revolution/os.h>

inline void OSs8tof32(s8* in, f32* out);

Arguments

in Pointer to the 8-bit integer value to be converted.
out Pointer to the 32-bit floating point value to be stored.

Return Values

None.

Description

Fast converts a signed 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.

See Also

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

Revision History

2006/03/01 Initial version.


CONFIDENTIAL