The Developer Preview for Android 11 is now available; test it out and share your feedback.

A radius for either circular or elliptical shapes.

## Summary

### Public constructors

<init>(x: Float, y: Float)

A radius for either circular or elliptical shapes.

### Public methods

div(operand: Float)

Division operator.

Binary subtraction operator.

rem(operand: Float)

Modulo (remainder) operator.

times(operand: Float)

Multiplication operator.

String

truncDiv(operand: Float)

Integer (truncating) division operator.

Unary negation operator.

### Properties

Float

The radius value on the horizontal axis.

Float

The radius value on the vertical axis.

### Companion properties

A radius with x and y values set to zero.

## Public constructors

### <init>

x: Float,
y: Float)

A radius for either circular or elliptical shapes.

## Public methods

### div

Division operator.

Returns a radius whose coordinates are the coordinates of the left-hand-side operand (a radius) divided by the scalar right-hand-side operand (a Float).

### minus

Binary subtraction operator.

Returns a radius whose x value is the left-hand-side operand's x minus the right-hand-side operand's x and whose y value is the left-hand-side operand's y minus the right-hand-side operand's y.

### plus

Returns a radius whose x value is the sum of the x values of the two operands, and whose y value is the sum of the y values of the two operands.

### rem

Modulo (remainder) operator.

Returns a radius whose coordinates are the remainder of dividing the coordinates of the left-hand-side operand (a radius) by the scalar right-hand-side operand (a Float).

### times

Multiplication operator.

Returns a radius whose coordinates are the coordinates of the left-hand-side operand (a radius) multiplied by the scalar right-hand-side operand (a Float).

### toString

fun toString(): String

### truncDiv

Integer (truncating) division operator.

Returns a radius whose coordinates are the coordinates of the left-hand-side operand (a radius) divided by the scalar right-hand-side operand (a Float), rounded towards zero.

### unaryMinus

Unary negation operator.

Returns a Radius with the distances negated.

Radiuses with negative values aren't geometrically meaningful, but could occur as part of expressions. For example, negating a radius of one pixel and then adding the result to another radius is equivalent to subtracting a radius of one pixel from the other.

## Properties

### x

val x: Float

The radius value on the horizontal axis.

### y

val y: Float

The radius value on the vertical axis.

## Companion functions

### circular

Constructs a circular radius. x and y will have the same radius value.

fun elliptical(
x: Float,
y: Float