_methods

trait _methods

Double Extension Methods

Extension methods universaly avaialble for type scala.Double

Source
_methods.scala
trait Double.Z.ToPrimitives[Double]
class java.lang.Object
trait scala.Matchable
class Any

Def

@scala.annotation.targetName("range")
inline def <>(inline to: Double): Double.<>

Range

Range

Returns Double.<> from current to given value

 (1.0 <> 10.0).tp  // Prints  1.0 <> 10.0
Source
_methods.scala
@scala.annotation.targetName("rangeX")
inline def <>>(inline to: Double): Double.<>

Exclusive end range

Exclusive end range

Returns Double.<> from current to given value exclusive

 (1.0 <>> 10.0).tp  // Prints  1.0 <>> 10.0
Source
_methods.scala
@scala.annotation.targetName("Opt")
inline def ?: Double.Opt

To option

To option

Returns Double.Opt for current value

 val o : Double.Opt = 12.0.?
Source
_methods.scala
inline def atLeast(v: Double): Double

Max

Max

Returns maximum of current or given value

 val v = 5F

 v.atLeast(0).tp   // Prints 5.0

 v.atLeast(10).tp  // Prints 10.0
Source
_methods.scala
inline def atMost(v: Double): Double

Min

Min

Returns minimun of current or given value

 val v = 5F

 v.atMost(0).tp   // Prints 0.0

 v.atMost(10).tp  // Prints 5.0
Source
_methods.scala
inline def roundDecimal(inline d: Int)(using inline r: Rounding): Double
inline def roundTo(inline size: Double)(using inline r: Rounding): Double

Round to size

Round to size

Rounds current value to specified size

 91F.roundTo(5).tp            // Prints 90.0

 91F.roundTo(5)(using UP).tp  // Prints 95.0
Source
_methods.scala

Make

inline def Big: BigDecimal

Make BigDecimal

Make BigDecimal

BigDecimal constructor attached to Double

Source
_methods.scala
inline def Byte: Byte

Make Byte

Make Byte

Attached Byte constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Char: Char

Make Char

Make Char

Attached Char constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Day: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Double

Source
_methods.scala
inline def Days: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Double

Source
_methods.scala
inline def Double: Double

Make Double

Make Double

Returnes underlying value

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Float: Float

Make Float

Make Float

Attached Float constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Hour: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Double

Source
_methods.scala
inline def Hours: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Double

Source
_methods.scala
inline def Int: Int

Make Int

Make Int

Attached Int constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Long: Long

Make Long

Make Long

Attached Long constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Micros: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Double

Source
_methods.scala
inline def Millis: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Double

Source
_methods.scala
inline def Minute: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Double

Source
_methods.scala
inline def Minutes: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Double

Source
_methods.scala
inline def Nanos: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Double

Source
_methods.scala
inline def Number: java.lang.Double

Make Number

Make Number

Attached Number constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Percent: Percent

Make Percent

Make Percent

Percent constructor attached to Double

Source
_methods.scala
inline def Second: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Double

Source
_methods.scala
inline def Seconds: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Double

Source
_methods.scala
inline def Short: Short

Make Short

Make Short

Attached Short constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Week: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Double

Source
_methods.scala
inline def Weeks: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Double

Source
_methods.scala