toggle menu
korge-root
5.1.0
common
switch theme
search in API
korge-foundation
/
korlibs.math.interpolation
/
Ratio
Ratio
inline
class
Ratio
(
val
value
:
Double
)
:
Comparable
<
Ratio
>
Members
Members & Extensions
Constructors
Ratio
Link copied to clipboard
constructor
(
ratio
:
Float
)
constructor
(
value
:
Int
,
maximum
:
Int
)
constructor
(
value
:
Float
,
maximum
:
Float
)
constructor
(
value
:
Double
,
maximum
:
Double
)
constructor
(
value
:
Double
)
Types
Companion
Link copied to clipboard
object
Companion
Properties
absolute
Value
Link copied to clipboard
val
absoluteValue
:
Ratio
clamped
Link copied to clipboard
val
clamped
:
Ratio
nice
Str
Link copied to clipboard
val
Ratio
.
niceStr
:
String
value
Link copied to clipboard
val
value
:
Double
Functions
clamp
Link copied to clipboard
fun
Ratio
.
clamp
(
min
:
Ratio
,
max
:
Ratio
)
:
Ratio
compare
To
Link copied to clipboard
open
operator override
fun
compareTo
(
other
:
Ratio
)
:
Int
convert
Range
Link copied to clipboard
fun
Ratio
.
convertRange
(
srcMin
:
Ratio
,
srcMax
:
Ratio
,
dstMin
:
Ratio
,
dstMax
:
Ratio
)
:
Ratio
convert
To
Range
Link copied to clipboard
fun
convertToRange
(
min
:
Ratio
,
max
:
Ratio
)
:
Ratio
fun
convertToRange
(
min
:
Double
,
max
:
Double
)
:
Double
fun
convertToRange
(
min
:
Float
,
max
:
Float
)
:
Float
div
Link copied to clipboard
operator
fun
div
(
that
:
Ratio
)
:
Ratio
operator
fun
div
(
that
:
Double
)
:
Double
div
Link copied to clipboard
inline operator
fun
Ratio
.
div
(
value
:
Double
)
:
Double
inline operator
fun
Ratio
.
div
(
value
:
Float
)
:
Float
interpolate
Link copied to clipboard
fun
<
T
:
Interpolable
<
T
>
>
Ratio
.
interpolate
(
l
:
T
,
r
:
T
)
:
T
fun
Ratio
.
interpolate
(
l
:
Matrix
,
r
:
Matrix
)
:
Matrix
fun
Ratio
.
interpolate
(
l
:
MatrixTransform
,
r
:
MatrixTransform
)
:
MatrixTransform
fun
Ratio
.
interpolate
(
l
:
Rectangle
,
r
:
Rectangle
)
:
Rectangle
fun
Ratio
.
interpolate
(
l
:
Scale
,
r
:
Scale
)
:
Scale
fun
Ratio
.
interpolate
(
l
:
Size
,
r
:
Size
)
:
Size
fun
Ratio
.
interpolate
(
l
:
Vector2D
,
r
:
Vector2D
)
:
Vector2D
fun
Ratio
.
interpolate
(
l
:
Vector2F
,
r
:
Vector2F
)
:
Vector2F
fun
<
T
>
Ratio
.
interpolate
(
l
:
Interpolable
<
T
>
,
r
:
Interpolable
<
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
interpolate
Angle
Link copied to clipboard
fun
Ratio
.
interpolateAngle
(
l
:
Angle
,
r
:
Angle
)
:
Angle
fun
Ratio
.
interpolateAngle
(
l
:
Angle
,
r
:
Angle
,
minimizeAngle
:
Boolean
)
:
Angle
interpolate
Angle
Denormalized
Link copied to clipboard
fun
Ratio
.
interpolateAngleDenormalized
(
l
:
Angle
,
r
:
Angle
)
:
Angle
interpolate
Angle
Normalized
Link copied to clipboard
fun
Ratio
.
interpolateAngleNormalized
(
l
:
Angle
,
r
:
Angle
)
:
Angle
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
is
Na
N
Link copied to clipboard
fun
isNaN
(
)
:
Boolean
minus
Link copied to clipboard
operator
fun
minus
(
that
:
Ratio
)
:
Ratio
nice
Str
Link copied to clipboard
fun
Ratio
.
niceStr
(
decimalPlaces
:
Int
,
zeroSuffix
:
Boolean
=
false
)
:
String
plus
Link copied to clipboard
operator
fun
plus
(
that
:
Ratio
)
:
Ratio
round
Decimal
Places
Link copied to clipboard
fun
roundDecimalPlaces
(
places
:
Int
)
:
Ratio
times
Link copied to clipboard
operator
fun
times
(
that
:
Ratio
)
:
Ratio
operator
fun
times
(
that
:
Double
)
:
Double
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
to
Double
Link copied to clipboard
fun
toDouble
(
)
:
Double
to
Float
Link copied to clipboard
fun
toFloat
(
)
:
Float
to
Ratio
Link copied to clipboard
fun
Ratio
.
toRatio
(
)
:
Ratio
to
String
Link copied to clipboard
open
override
fun
toString
(
)
:
String
unary
Minus
Link copied to clipboard
operator
fun
unaryMinus
(
)
:
Ratio
unary
Plus
Link copied to clipboard
operator
fun
unaryPlus
(
)
:
Ratio