Seperating mapcompile into files.
This commit is contained in:
5
tools/mapcompile/helper.py
Normal file
5
tools/mapcompile/helper.py
Normal file
@ -0,0 +1,5 @@
|
||||
def floatToFixed248(value):
|
||||
# Converts a float to the fixed248_t used internally.
|
||||
high24 = int(value) & 0xFFFFFF
|
||||
low8 = int((value * 256.0 - high24) * 256.0) & 0xFF
|
||||
return (high24 << 8) | low8
|
Reference in New Issue
Block a user