diff options
author | Chris Robinson <[email protected]> | 2018-05-03 21:43:53 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-05-03 22:02:32 -0700 |
commit | ac8dbd7a56e4ca0ccfbef61b89bdb55775abea6a (patch) | |
tree | d4b67b98a59bb7812460df8c2426e3dfccefff84 /OpenAL32/Include | |
parent | d8a659c6f2db425729a33b0649f467c14ef18a9b (diff) |
Add a specific function for truncating float-to-int conversions
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r-- | OpenAL32/Include/alMain.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 78dd01c5..1cf1e5e2 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -260,6 +260,13 @@ inline ALint fastf2i(ALfloat f) #endif } +/* Converts float-to-int using standard behavior (truncation). */ +inline int float2int(float f) +{ + /* TODO: Make a more efficient method for x87. */ + return (ALint)f; +} + enum DevProbe { ALL_DEVICE_PROBE, |