Skip to content

ESE_Math Class

NarcoMarshDev edited this page Oct 22, 2022 · 2 revisions

Category: Static
Path: scripts/Game/ESE_Math.c

Additional math functions to the base game math library.

Overview

Todo

Methods

Name⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ Return⠀⠀⠀⠀⠀ Description
CeilToNearestMultiple (float num, float mult) float Raises given number to the nearest multiple given to the function. Always rounds up.
FixInt180 (int angle) int Takes any integer angle and fixes it between -180 & 180 degrees. Values over 360 get converted to one <= 360 before fixing.
FixFloat180 (float angle) float Same as FixInt180() but using floats instead. This method is slower however due to using a float modulus operation.
FixVector180 (vector vec) vector Runs FixFloat180() on all elements of a given vector and returns the result.
FaseFixInt180 (int angle) int Same as FixInt180() but assumes input parameter will be between 360 & -360 to achieve better performance.
FastFixFloat180 (float angle) float Same as FixFloat180() but assumes input parameter will be between 360 & -360 to achieve better performance.
FastFixVector180 (vector vec) vector Same as FixVector180() but assumes all elements of the vector are between 360 & -360 to achieve better performance.
Clone this wiki locally