mirror of
https://github.com/luksamuk/engine-psx.git
synced 2025-04-29 13:58:02 +03:00
6 lines
151 B
Python
6 lines
151 B
Python
def tofixed(value: float, scale: int) -> int:
|
|
return int(value * (1 << scale))
|
|
|
|
|
|
def tofixed12(value: float) -> int:
|
|
return tofixed(value, 12)
|