Sign

enum Sign : Enum<Sign> (source)

Represents the sign of a number: negative, zero, or positive.

Parameters

signInt

The integer representation of the sign: -1 for negative, 0 for zero, 1 for positive.

Entries

Link copied to clipboard

Negative sign (for numbers less than zero).

Link copied to clipboard

Zero sign (for numbers equal to zero).

Link copied to clipboard

Positive sign (for numbers greater than zero).

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard

Checks if this sign is negative.

Link copied to clipboard

Checks if this sign is non-negative (i.e. zero or positive).

Link copied to clipboard

Checks if this sign is non-positive (i.e. zero or negative).

Link copied to clipboard

Checks if this sign is non-zero.

Link copied to clipboard

Checks if this sign is positive.

Link copied to clipboard

Checks if this sign is zero.

Link copied to clipboard
operator fun Sign.times(other: Sign): Sign

Multiplies this sign by another sign.

Link copied to clipboard
fun toSignInt(): Int

Returns the integer representation of this sign.

Link copied to clipboard
operator fun Sign.unaryMinus(): Sign

Returns the negation of this sign.

Link copied to clipboard
fun valueOf(value: String): Sign

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard
fun values(): Array<Sign>

Returns an array containing the constants of this enum type, in the order they're declared.