# PxCubed

@Immutable inline class PxCubed : Comparable<PxCubed>
 kotlin.Any ↳ androidx.ui.core.PxCubed

Holds a unit of cubed dimensions, such as 1.value * 2.value * 3.px. PxSquared, PxCubed, and PxInverse are used primarily for Px calculations to ensure resulting units are as expected. Many times, Px calculations use scalars to determine the final dimension during calculation: val width = oldWidth * stretchAmount Other times, it is useful to do intermediate calculations with Dimensions directly: val width = oldWidth * newTotalWidth / oldTotalWidth

## Summary

### Public constructors

<init>(value: Float)

Holds a unit of cubed dimensions, such as 1.value * 2.value * 3.px.

### Public methods

operator Int

Support comparing PxCubed with comparison operators.

operator PxCubed
div(other: Float)

Divide a PxCubed by a scalar.

operator PxSquared
div(other: Px)

Divide by a Px to get a PxSquared result.

operator Px
div(other: PxSquared)

Divide by a PxSquared to get a Px result.

operator Float
div(other: PxCubed)

Divide by a PxCubed to get a scalar result.

operator PxCubed
minus(dimension: PxCubed)

Subtract a PxCubed from another one.

operator PxCubed
plus(dimension: PxCubed)

operator PxCubed
times(other: Float)

Multiply by a scalar to get a PxCubed result.

String

Float

## Public constructors

### <init>

PxCubed(value: Float)

Holds a unit of cubed dimensions, such as 1.value * 2.value * 3.px. PxSquared, PxCubed, and PxInverse are used primarily for Px calculations to ensure resulting units are as expected. Many times, Px calculations use scalars to determine the final dimension during calculation: val width = oldWidth * stretchAmount Other times, it is useful to do intermediate calculations with Dimensions directly: val width = oldWidth * newTotalWidth / oldTotalWidth

## Public methods

### compareTo

inline operator fun compareTo(other: PxCubed): Int

Support comparing PxCubed with comparison operators.

### div

inline operator fun div(other: Float): PxCubed

Divide a PxCubed by a scalar.

### div

inline operator fun div(other: Px): PxSquared

Divide by a Px to get a PxSquared result.

### div

inline operator fun div(other: PxSquared): Px

Divide by a PxSquared to get a Px result.

### div

inline operator fun div(other: PxCubed): Float

Divide by a PxCubed to get a scalar result.

### minus

inline operator fun minus(dimension: PxCubed): PxCubed

Subtract a PxCubed from another one.

### plus

inline operator fun plus(dimension: PxCubed): PxCubed

### times

inline operator fun times(other: Float): PxCubed

Multiply by a scalar to get a PxCubed result.

### toString

fun toString(): String

val value: Float