toggle menu
MapLibre Native Android
11.6.1
androidJvm
switch theme
search in API
MapLibre Native Android
/
org.maplibre.android.utils
/
MathUtils
Math
Utils
open
class
MathUtils
Members
Constructors
Math
Utils
Link copied to clipboard
constructor
(
)
Functions
clamp
Link copied to clipboard
open
fun
clamp
(
value
:
Double
,
min
:
Double
,
max
:
Double
)
:
Double
open
fun
clamp
(
value
:
Float
,
min
:
Float
,
max
:
Float
)
:
Float
Test a value in specified range, returning minimum if it's below, and maximum if it's above
normalize
Link copied to clipboard
open
fun
normalize
(
x
:
Double
,
dataLow
:
Double
,
dataHigh
:
Double
,
normalizedLow
:
Double
,
normalizedHigh
:
Double
)
:
Double
Scale a value from an arbitrary range to a normalized range.
wrap
Link copied to clipboard
open
fun
wrap
(
value
:
Double
,
min
:
Double
,
max
:
Double
)
:
Double
Constrains value to the given range (including min, excluding max) via modular arithmetic.