korlibs
Toggle table of contents
6.1.0-SNAPSHOT
common
Target filter
common
Switch theme
Search in API
Skip to content
korlibs
korlibs-math-core
/
korlibs.math.interpolation
Package-level
declarations
Types
Functions
Types
Easing
Link copied to clipboard
fun
interface
Easing
Interpolable
Link copied to clipboard
interface
Interpolable
<
T
>
Mutable
Interpolable
Link copied to clipboard
interface
MutableInterpolable
<
T
>
Ratio
Link copied to clipboard
inline
class
Ratio
(
val
value
:
Double
)
:
Comparable
<
Ratio
>
Functions
abs
Link copied to clipboard
fun
abs
(
a
:
Ratio
)
:
Ratio
clamp
Link copied to clipboard
fun
Ratio
.
clamp
(
min
:
Ratio
,
max
:
Ratio
)
:
Ratio
convert
Range
Link copied to clipboard
fun
Ratio
.
convertRange
(
srcMin
:
Ratio
,
srcMax
:
Ratio
,
dstMin
:
Ratio
,
dstMax
:
Ratio
)
:
Ratio
div
Link copied to clipboard
inline operator
fun
Ratio
.
div
(
value
:
Double
)
:
Double
inline operator
fun
Ratio
.
div
(
value
:
Float
)
:
Float
inline operator
fun
Double
.
div
(
ratio
:
Ratio
)
:
Double
inline operator
fun
Float
.
div
(
ratio
:
Ratio
)
:
Float
inline operator
fun
Int
.
div
(
ratio
:
Ratio
)
:
Double
interpolate
Link copied to clipboard
fun
<
T
:
Interpolable
<
T
>
>
Ratio
.
interpolate
(
l
:
T
,
r
:
T
)
:
T
fun
Ratio
.
interpolate
(
l
:
Ratio
,
r
:
Ratio
)
:
Ratio
fun
Ratio
.
interpolate
(
l
:
Double
,
r
:
Double
)
:
Double
fun
Ratio
.
interpolate
(
l
:
Float
,
r
:
Float
)
:
Float
fun
Ratio
.
interpolate
(
l
:
Int
,
r
:
Int
)
:
Int
fun
Ratio
.
interpolate
(
l
:
Long
,
r
:
Long
)
:
Long
is
Almost
Equals
Link copied to clipboard
fun
Ratio
.
isAlmostEquals
(
that
:
Ratio
,
epsilon
:
Ratio
=
Ratio(0.000001)
)
:
Boolean
is
Almost
Zero
Link copied to clipboard
fun
Ratio
.
isAlmostZero
(
epsilon
:
Ratio
=
Ratio(0.000001)
)
:
Boolean
max
Link copied to clipboard
fun
max
(
a
:
Ratio
,
b
:
Ratio
)
:
Ratio
min
Link copied to clipboard
fun
min
(
a
:
Ratio
,
b
:
Ratio
)
:
Ratio
round
Decimal
Places
Link copied to clipboard
fun
Ratio
.
roundDecimalPlaces
(
places
:
Int
)
:
Ratio
times
Link copied to clipboard
inline operator
fun
Ratio
.
times
(
value
:
Ratio
)
:
Ratio
inline operator
fun
Ratio
.
times
(
value
:
Double
)
:
Double
inline operator
fun
Ratio
.
times
(
value
:
Float
)
:
Float
inline operator
fun
Double
.
times
(
ratio
:
Ratio
)
:
Double
inline operator
fun
Float
.
times
(
ratio
:
Ratio
)
:
Float
inline operator
fun
Int
.
times
(
ratio
:
Ratio
)
:
Double
to
Ratio
Link copied to clipboard
fun
Ratio
.
toRatio
(
)
:
Ratio
fun
Double
.
toRatio
(
)
:
Ratio
fun
Float
.
toRatio
(
)
:
Ratio
inline
fun
Number
.
toRatio
(
)
:
Ratio
fun
Double
.
toRatio
(
max
:
Double
)
:
Ratio
fun
Float
.
toRatio
(
max
:
Float
)
:
Ratio
inline
fun
Number
.
toRatio
(
max
:
Number
)
:
Ratio
to
Ratio
Clamped
Link copied to clipboard
fun
Double
.
toRatioClamped
(
)
:
Ratio
fun
Float
.
toRatioClamped
(
)
:
Ratio
fun
Number
.
toRatioClamped
(
)
:
Ratio