FloatFloatPair



Container to ease passing around a tuple of two Float values.

Note: This class is optimized by using a value class, a Kotlin language featured not available from Java code. Java developers can get the same functionality by using Pair or by constructing a custom implementation using Float parameters directly (see LongLongPair for an example).

Summary

Public constructors

FloatFloatPair(first: Float, second: Float)

Constructs a FloatFloatPair with two Float values.

Cmn

Public functions

inline operator Float

Returns the first component of the pair.

Cmn
inline operator Float

Returns the second component of the pair.

Cmn
open String
Cmn

Public properties

Float

The first value in the pair.

Cmn
Long

The internal representation of the FloatFloatPair.

Cmn
Float

The second value in the pair.

Cmn

Public constructors

FloatFloatPair

FloatFloatPair(first: Float, second: Float)

Constructs a FloatFloatPair with two Float values.

Parameters
first: Float

the first value in the pair

second: Float

the second value in the pair

Public functions

component1

inline operator fun component1(): Float

Returns the first component of the pair. For instance, the first component of PairFloatFloat(3f, 4f) is 3f.

This method allows to use destructuring declarations when working with pairs, for example:

val (first, second) = myPair

component2

inline operator fun component2(): Float

Returns the second component of the pair. For instance, the second component of PairFloatFloat(3f, 4f) is 4f.

This method allows to use destructuring declarations when working with pairs, for example:

val (first, second) = myPair

toString

open fun toString(): String

Public properties

first

val firstFloat

The first value in the pair.

packedValue

val packedValueLong

The internal representation of the FloatFloatPair. packedValue has no guarantees for stability across library versions.

second

val secondFloat

The second value in the pair.