PxSquared
@Immutable inline class PxSquared : Comparable<PxSquared>
kotlin.Any  
↳  androidx.ui.core.PxSquared 
Holds a unit of squared dimensions, such as 1.value * 2.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 


Holds a unit of squared dimensions, such as 
Public methods 


operator Int 
Support comparing PxSquared with comparison operators. 
operator PxSquared 
Divide a DimensionSquare by a scalar. 
operator Px  
operator Float 
Divide by a PxSquared to get a scalar result. 
operator PxInverse  
operator PxSquared 
Subtract a DimensionSquare from another one. 
operator PxSquared 
Add two DimensionSquares together. 
operator PxSquared 
Multiply by a scalar to get a PxSquared result. 
operator PxCubed 
Multiply by a scalar to get a PxSquared result. 
String 
toString() 
Properties 


Float 
Public constructors
<init>
PxSquared(value: Float)
Holds a unit of squared dimensions, such as 1.value * 2.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: PxSquared): Int
Support comparing PxSquared with comparison operators.
minus
inline operator fun minus(other: PxSquared): PxSquared
Subtract a DimensionSquare from another one.
times
inline operator fun times(other: Float): PxSquared
Multiply by a scalar to get a PxSquared result.
toString
fun toString(): String
Properties
value
val value: Float