Function

toMeter

Converts a Dp value to Meter.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

toMeter

Android
public inline fun Dp.toMeter(): Meter

Converts a Dp value to Meter.

Handles unspecified and infinite Dp values gracefully.

Returns

the equivalent value in meters, or Meter.NaN if the Dp is unspecified, or Meter.Infinity if the Dp is infinite.