Meter
value class Meter : Comparable
Represents a dimension value in meters within 3D space.
This is the standard unit used by the system for representing size and distance in 3D environments.
Summary
Public companion properties |
|
|---|---|
Meter |
Represents an infinite distance in meters. |
Meter |
Represents an undefined or unrepresentable distance in meters. |
Meter |
|
Meter |
|
Meter |
|
Meter |
|
Meter |
|
Meter |
|
Meter |
|
Meter |
|
Meter |
Public functions |
|
|---|---|
open operator Int |
|
inline operator Meter |
|
inline operator Meter |
|
inline operator Meter |
|
inline operator Meter |
Subtracts another |
inline operator Meter |
Adds another |
inline Int |
Converts this |
inline operator Meter |
|
inline operator Meter |
|
inline operator Meter |
|
inline Float |
toCm() |
inline Dp |
toDp()Converts this |
inline Float |
toM() |
inline Float |
toMm() |
inline Float |
Converts this |
Public properties |
|
|---|---|
Boolean |
Checks if this |
Boolean |
Checks if this |
Float |
Public companion functions
Public companion properties
Public constructors
Public functions
minus
inline operator fun minus(other: Meter): Meter
Subtracts another Meter value from this one.
plus
inline operator fun plus(other: Meter): Meter
Adds another Meter value to this one.
roundToPx
inline fun roundToPx(density: Density): Int
Converts this Meter value to the nearest Int number of pixels, taking into account density.
times
inline operator fun times(other: Double): Meter
Multiplies this Meter value by a Double factor.
| Parameters | |
|---|---|
other: Double |
the double factor to multiply by. |
times
inline operator fun times(other: Float): Meter
Multiplies this Meter value by a Float factor.
| Parameters | |
|---|---|
other: Float |
the float factor to multiply by. |
times
inline operator fun times(other: Int): Meter
Multiplies this Meter value by an Int factor.
| Parameters | |
|---|---|
other: Int |
the integer factor to multiply by. |
toDp
inline fun toDp(): Dp
Converts this Meter value to the Dp number of density-independent pixels it contains.
Public properties
isFinite
val isFinite: Boolean
Checks if this Meter value is finite.
| Returns | |
|---|---|
Boolean |
|
isSpecified
val isSpecified: Boolean
Checks if this Meter value is specified (i.e., not NaN).
| Returns | |
|---|---|
Boolean |
|