float (original) (raw)
scala.compiletime.ops.float
Attributes
Source
Graph
Supertypes
Self type
Members list
Remainder of the division of X
by Y
.
Remainder of the division of X
by Y
.
import compiletime.ops.float.*
val mod: 5.0f % 2.0f = 1.0f
Attributes
Source
Multiplication of two Float
singleton types.
Multiplication of two Float
singleton types.
import compiletime.ops.float.*
val mul: 4.0f * 2.0f = 8.0f
Attributes
Source
Addition of two Float
singleton types.
Addition of two Float
singleton types.
import compiletime.ops.float.*
val sum: 2.0f + 2.0f = 4.0f
Attributes
Source
Subtraction of two Float
singleton types.
Subtraction of two Float
singleton types.
import compiletime.ops.float.*
val sub: 4.0f - 2.0f = 2.0f
Attributes
Source
Integer division of two Float
singleton types.
Integer division of two Float
singleton types.
import compiletime.ops.float.*
val div: 5.0f / 2.0f = 2.5f
Attributes
Source
Less-than comparison of two Float
singleton types.
Less-than comparison of two Float
singleton types.
import compiletime.ops.float.*
val lt1: 4.0f < 2.0f = false
val lt2: 2.0f < 4.0f = true
Attributes
Source
Less-or-equal comparison of two Float
singleton types.
Less-or-equal comparison of two Float
singleton types.
import compiletime.ops.float.*
val lt1: 4.0f <= 2.0f = false
val lt2: 2.0f <= 2.0f = true
Attributes
Source
Greater-than comparison of two Float
singleton types.
Greater-than comparison of two Float
singleton types.
import compiletime.ops.float.*
val gt1: 4.0f > 2.0f = true
val gt2: 2.0f > 2.0f = false
Attributes
Source
Greater-or-equal comparison of two Float
singleton types.
Greater-or-equal comparison of two Float
singleton types.
import compiletime.ops.float.*
val ge1: 4.0f >= 2.0f = true
val ge2: 2.0f >= 3.0f = false
Attributes
Source
Absolute value of an Float
singleton type.
Absolute value of an Float
singleton type.
import compiletime.ops.float.*
val abs: Abs[-1.0f] = 1.0f
Attributes
Source
Maximum of two Float
singleton types.
Maximum of two Float
singleton types.
import compiletime.ops.float.*
val max: Max[-1.0f, 1.0f] = 1.0f
Attributes
Source
Minimum of two Float
singleton types.
Minimum of two Float
singleton types.
import compiletime.ops.float.*
val min: Min[-1.0f, 1.0f] = -1.0f
Attributes
Source
Negation of an Float
singleton type.
Negation of an Float
singleton type.
import compiletime.ops.float.*
val neg1: Negate[-1.0f] = 1.0f
val neg2: Negate[1.0f] = -1.0f
Attributes
Source
Double conversion of a Float
singleton type.
Double conversion of a Float
singleton type.
import compiletime.ops.float.*
val x: ToDouble[1.0f] = 1.0
Attributes
Source
Int conversion of a Float
singleton type.
Int conversion of a Float
singleton type.
import compiletime.ops.float.*
val x: ToInt[1.0f] = 1
Attributes
Source
Long conversion of a Float
singleton type.
Long conversion of a Float
singleton type.
import compiletime.ops.float.*
val x: ToLong[1.0f] = 1L
Attributes
Source
In this article