Double

scala.Double
See theDouble companion object
final abstract class Double() extends AnyVal

Double, a 64-bit IEEE-754 floating point number (equivalent to Java's double primitive type) is a subtype of scala.AnyVal. Instances of Double are not represented by an object in the underlying runtime system.

The companion object provides useful non-primitive operations as extension methods.

Attributes

Companion
object
Source
Double.scala
Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Abstract methods

def !=(x: Byte): Boolean

Returns true if this value is not equal to x, false otherwise.

Returns true if this value is not equal to x, false otherwise.

Attributes

Source
Double.scala
def !=(x: Short): Boolean

Returns true if this value is not equal to x, false otherwise.

Returns true if this value is not equal to x, false otherwise.

Attributes

Source
Double.scala
def !=(x: Char): Boolean

Returns true if this value is not equal to x, false otherwise.

Returns true if this value is not equal to x, false otherwise.

Attributes

Source
Double.scala
def !=(x: Int): Boolean

Returns true if this value is not equal to x, false otherwise.

Returns true if this value is not equal to x, false otherwise.

Attributes

Source
Double.scala
def !=(x: Long): Boolean

Returns true if this value is not equal to x, false otherwise.

Returns true if this value is not equal to x, false otherwise.

Attributes

Source
Double.scala
def !=(x: Float): Boolean

Returns true if this value is not equal to x, false otherwise.

Returns true if this value is not equal to x, false otherwise.

Attributes

Source
Double.scala
def !=(x: Double): Boolean

Returns true if this value is not equal to x, false otherwise.

Returns true if this value is not equal to x, false otherwise.

Attributes

Source
Double.scala
def %(x: Byte): Double

Returns the remainder of the division of this value by x.

Returns the remainder of the division of this value by x.

Value parameters

x

the divisor

Attributes

Source
Double.scala
def %(x: Short): Double

Returns the remainder of the division of this value by x.

Returns the remainder of the division of this value by x.

Value parameters

x

the divisor

Attributes

Source
Double.scala
def %(x: Char): Double

Returns the remainder of the division of this value by x.

Returns the remainder of the division of this value by x.

Value parameters

x

the divisor

Attributes

Source
Double.scala
def %(x: Int): Double

Returns the remainder of the division of this value by x.

Returns the remainder of the division of this value by x.

Value parameters

x

the divisor

Attributes

Source
Double.scala
def %(x: Long): Double

Returns the remainder of the division of this value by x.

Returns the remainder of the division of this value by x.

Value parameters

x

the divisor

Attributes

Source
Double.scala
def %(x: Float): Double

Returns the remainder of the division of this value by x.

Returns the remainder of the division of this value by x.

Value parameters

x

the divisor

Attributes

Source
Double.scala
def %(x: Double): Double

Returns the remainder of the division of this value by x.

Returns the remainder of the division of this value by x.

Value parameters

x

the divisor

Attributes

Source
Double.scala
def *(x: Byte): Double

Returns the product of this value and x.

Returns the product of this value and x.

Value parameters

x

the value to multiply this value by

Attributes

Source
Double.scala
def *(x: Short): Double

Returns the product of this value and x.

Returns the product of this value and x.

Value parameters

x

the value to multiply this value by

Attributes

Source
Double.scala
def *(x: Char): Double

Returns the product of this value and x.

Returns the product of this value and x.

Value parameters

x

the value to multiply this value by

Attributes

Source
Double.scala
def *(x: Int): Double

Returns the product of this value and x.

Returns the product of this value and x.

Value parameters

x

the value to multiply this value by

Attributes

Source
Double.scala
def *(x: Long): Double

Returns the product of this value and x.

Returns the product of this value and x.

Value parameters

x

the value to multiply this value by

Attributes

Source
Double.scala
def *(x: Float): Double

Returns the product of this value and x.

Returns the product of this value and x.

Value parameters

x

the value to multiply this value by

Attributes

Source
Double.scala
def *(x: Double): Double

Returns the product of this value and x.

Returns the product of this value and x.

Value parameters

x

the value to multiply this value by

Attributes

Source
Double.scala
def +(x: Byte): Double

Returns the sum of this value and x.

Returns the sum of this value and x.

Value parameters

x

the value to add to this value

Attributes

Source
Double.scala
def +(x: Short): Double

Returns the sum of this value and x.

Returns the sum of this value and x.

Value parameters

x

the value to add to this value

Attributes

Source
Double.scala
def +(x: Char): Double

Returns the sum of this value and x.

Returns the sum of this value and x.

Value parameters

x

the value to add to this value

Attributes

Source
Double.scala
def +(x: Int): Double

Returns the sum of this value and x.

Returns the sum of this value and x.

Value parameters

x

the value to add to this value

Attributes

Source
Double.scala
def +(x: Long): Double

Returns the sum of this value and x.

Returns the sum of this value and x.

Value parameters

x

the value to add to this value

Attributes

Source
Double.scala
def +(x: Float): Double

Returns the sum of this value and x.

Returns the sum of this value and x.

Value parameters

x

the value to add to this value

Attributes

Source
Double.scala
def +(x: Double): Double

Returns the sum of this value and x.

Returns the sum of this value and x.

Value parameters

x

the value to add to this value

Attributes

Source
Double.scala
def -(x: Byte): Double

Returns the difference of this value and x.

Returns the difference of this value and x.

Value parameters

x

the value to subtract from this value

Attributes

Source
Double.scala
def -(x: Short): Double

Returns the difference of this value and x.

Returns the difference of this value and x.

Value parameters

x

the value to subtract from this value

Attributes

Source
Double.scala
def -(x: Char): Double

Returns the difference of this value and x.

Returns the difference of this value and x.

Value parameters

x

the value to subtract from this value

Attributes

Source
Double.scala
def -(x: Int): Double

Returns the difference of this value and x.

Returns the difference of this value and x.

Value parameters

x

the value to subtract from this value

Attributes

Source
Double.scala
def -(x: Long): Double

Returns the difference of this value and x.

Returns the difference of this value and x.

Value parameters

x

the value to subtract from this value

Attributes

Source
Double.scala
def -(x: Float): Double

Returns the difference of this value and x.

Returns the difference of this value and x.

Value parameters

x

the value to subtract from this value

Attributes

Source
Double.scala
def -(x: Double): Double

Returns the difference of this value and x.

Returns the difference of this value and x.

Value parameters

x

the value to subtract from this value

Attributes

Source
Double.scala
def /(x: Byte): Double

Returns the quotient of this value and x.

Returns the quotient of this value and x.

Value parameters

x

the value to divide this value by

Attributes

Source
Double.scala
def /(x: Short): Double

Returns the quotient of this value and x.

Returns the quotient of this value and x.

Value parameters

x

the value to divide this value by

Attributes

Source
Double.scala
def /(x: Char): Double

Returns the quotient of this value and x.

Returns the quotient of this value and x.

Value parameters

x

the value to divide this value by

Attributes

Source
Double.scala
def /(x: Int): Double

Returns the quotient of this value and x.

Returns the quotient of this value and x.

Value parameters

x

the value to divide this value by

Attributes

Source
Double.scala
def /(x: Long): Double

Returns the quotient of this value and x.

Returns the quotient of this value and x.

Value parameters

x

the value to divide this value by

Attributes

Source
Double.scala
def /(x: Float): Double

Returns the quotient of this value and x.

Returns the quotient of this value and x.

Value parameters

x

the value to divide this value by

Attributes

Source
Double.scala
def /(x: Double): Double

Returns the quotient of this value and x.

Returns the quotient of this value and x.

Value parameters

x

the value to divide this value by

Attributes

Source
Double.scala
def <(x: Byte): Boolean

Returns true if this value is less than x, false otherwise.

Returns true if this value is less than x, false otherwise.

Value parameters

x

the value to compare against this one

Attributes

Source
Double.scala
def <(x: Short): Boolean

Returns true if this value is less than x, false otherwise.

Returns true if this value is less than x, false otherwise.

Value parameters

x

the value to compare against this one

Attributes

Source
Double.scala
def <(x: Char): Boolean

Returns true if this value is less than x, false otherwise.

Returns true if this value is less than x, false otherwise.

Value parameters

x

the value to compare against this one

Attributes

Source
Double.scala
def <(x: Int): Boolean

Returns true if this value is less than x, false otherwise.

Returns true if this value is less than x, false otherwise.

Value parameters

x

the value to compare against this one

Attributes

Source
Double.scala
def <(x: Long): Boolean

Returns true if this value is less than x, false otherwise.

Returns true if this value is less than x, false otherwise.

Value parameters

x

the value to compare against this one

Attributes

Source
Double.scala
def <(x: Float): Boolean

Returns true if this value is less than x, false otherwise.

Returns true if this value is less than x, false otherwise.

Value parameters

x

the value to compare against this one

Attributes

Source
Double.scala
def <(x: Double): Boolean

Returns true if this value is less than x, false otherwise.

Returns true if this value is less than x, false otherwise.

Value parameters

x

the value to compare against this one

Attributes

Source
Double.scala
def <=(x: Byte): Boolean

Returns true if this value is less than or equal to x, false otherwise.

Returns true if this value is less than or equal to x, false otherwise.

Attributes

Source
Double.scala
def <=(x: Short): Boolean

Returns true if this value is less than or equal to x, false otherwise.

Returns true if this value is less than or equal to x, false otherwise.

Attributes

Source
Double.scala
def <=(x: Char): Boolean

Returns true if this value is less than or equal to x, false otherwise.

Returns true if this value is less than or equal to x, false otherwise.

Attributes

Source
Double.scala
def <=(x: Int): Boolean

Returns true if this value is less than or equal to x, false otherwise.

Returns true if this value is less than or equal to x, false otherwise.

Attributes

Source
Double.scala
def <=(x: Long): Boolean

Returns true if this value is less than or equal to x, false otherwise.

Returns true if this value is less than or equal to x, false otherwise.

Attributes

Source
Double.scala
def <=(x: Float): Boolean

Returns true if this value is less than or equal to x, false otherwise.

Returns true if this value is less than or equal to x, false otherwise.

Attributes

Source
Double.scala
def <=(x: Double): Boolean

Returns true if this value is less than or equal to x, false otherwise.

Returns true if this value is less than or equal to x, false otherwise.

Attributes

Source
Double.scala
def ==(x: Byte): Boolean

Returns true if this value is equal to x, false otherwise.

Returns true if this value is equal to x, false otherwise.

Attributes

Source
Double.scala
def ==(x: Short): Boolean

Returns true if this value is equal to x, false otherwise.

Returns true if this value is equal to x, false otherwise.

Attributes

Source
Double.scala
def ==(x: Char): Boolean

Returns true if this value is equal to x, false otherwise.

Returns true if this value is equal to x, false otherwise.

Attributes

Source
Double.scala
def ==(x: Int): Boolean

Returns true if this value is equal to x, false otherwise.

Returns true if this value is equal to x, false otherwise.

Attributes

Source
Double.scala
def ==(x: Long): Boolean

Returns true if this value is equal to x, false otherwise.

Returns true if this value is equal to x, false otherwise.

Attributes

Source
Double.scala
def ==(x: Float): Boolean

Returns true if this value is equal to x, false otherwise.

Returns true if this value is equal to x, false otherwise.

Attributes

Source
Double.scala
def ==(x: Double): Boolean

Returns true if this value is equal to x, false otherwise.

Returns true if this value is equal to x, false otherwise.

Attributes

Source
Double.scala
def >(x: Byte): Boolean

Returns true if this value is greater than x, false otherwise.

Returns true if this value is greater than x, false otherwise.

Value parameters

x

the value to compare against this one

Attributes

Source
Double.scala
def >(x: Short): Boolean

Returns true if this value is greater than x, false otherwise.

Returns true if this value is greater than x, false otherwise.

Value parameters

x

the value to compare against this one

Attributes

Source
Double.scala
def >(x: Char): Boolean

Returns true if this value is greater than x, false otherwise.

Returns true if this value is greater than x, false otherwise.

Value parameters

x

the value to compare against this one

Attributes

Source
Double.scala
def >(x: Int): Boolean

Returns true if this value is greater than x, false otherwise.

Returns true if this value is greater than x, false otherwise.

Value parameters

x

the value to compare against this one

Attributes

Source
Double.scala
def >(x: Long): Boolean

Returns true if this value is greater than x, false otherwise.

Returns true if this value is greater than x, false otherwise.

Value parameters

x

the value to compare against this one

Attributes

Source
Double.scala
def >(x: Float): Boolean

Returns true if this value is greater than x, false otherwise.

Returns true if this value is greater than x, false otherwise.

Value parameters

x

the value to compare against this one

Attributes

Source
Double.scala
def >(x: Double): Boolean

Returns true if this value is greater than x, false otherwise.

Returns true if this value is greater than x, false otherwise.

Value parameters

x

the value to compare against this one

Attributes

Source
Double.scala
def >=(x: Byte): Boolean

Returns true if this value is greater than or equal to x, false otherwise.

Returns true if this value is greater than or equal to x, false otherwise.

Attributes

Source
Double.scala
def >=(x: Short): Boolean

Returns true if this value is greater than or equal to x, false otherwise.

Returns true if this value is greater than or equal to x, false otherwise.

Attributes

Source
Double.scala
def >=(x: Char): Boolean

Returns true if this value is greater than or equal to x, false otherwise.

Returns true if this value is greater than or equal to x, false otherwise.

Attributes

Source
Double.scala
def >=(x: Int): Boolean

Returns true if this value is greater than or equal to x, false otherwise.

Returns true if this value is greater than or equal to x, false otherwise.

Attributes

Source
Double.scala
def >=(x: Long): Boolean

Returns true if this value is greater than or equal to x, false otherwise.

Returns true if this value is greater than or equal to x, false otherwise.

Attributes

Source
Double.scala
def >=(x: Float): Boolean

Returns true if this value is greater than or equal to x, false otherwise.

Returns true if this value is greater than or equal to x, false otherwise.

Attributes

Source
Double.scala
def >=(x: Double): Boolean

Returns true if this value is greater than or equal to x, false otherwise.

Returns true if this value is greater than or equal to x, false otherwise.

Attributes

Source
Double.scala
def toByte: Byte

Attributes

Source
Double.scala
def toChar: Char

Attributes

Source
Double.scala

Attributes

Source
Double.scala
def toFloat: Float

Attributes

Source
Double.scala
def toInt: Int

Attributes

Source
Double.scala
def toLong: Long

Attributes

Source
Double.scala
def toShort: Short

Attributes

Source
Double.scala

Returns this value, unmodified.

Returns this value, unmodified.

Attributes

Source
Double.scala

Returns the negation of this value.

Returns the negation of this value.

Attributes

Source
Double.scala

Concrete methods

def abs: Double
Extension method from Double

Returns the absolute value of this.

Returns the absolute value of this.

Attributes

Source
Double.scala
def ceil: Double
Extension method from Double

Returns the smallest integer greater or equal to this.

Returns the smallest integer greater or equal to this.

Attributes

Source
Double.scala
def compare(that: Double): Int
Extension method from Double

Compares this to that according to the standard total ordering.

Compares this to that according to the standard total ordering.

Returns:

  • a positive value if this > that
  • a negative value if this &lt; that
  • 0 if this == that

Special cases for this method:

  • 0.0 is considered greater than -0.0
  • NaN is considered greater than all other values, but equal to itself

Attributes

Source
Double.scala
def floor: Double
Extension method from Double

Returns the largest integer smaller or equal to this.

Returns the largest integer smaller or equal to this.

Attributes

Source
Double.scala
Extension method from Double

Returns true iff this is a finite value, i.e., not an infinity nor NaN.

Returns true iff this is a finite value, i.e., not an infinity nor NaN.

Attributes

Source
Double.scala
Extension method from Double

Returns true iff this is PositiveInfinity or NegativeInfinity.

Returns true iff this is PositiveInfinity or NegativeInfinity.

Attributes

Source
Double.scala
def isNaN: Boolean
Extension method from Double

Returns true iff this is a NaN value.

Returns true iff this is a NaN value.

Attributes

Source
Double.scala
Extension method from Double

Returns true iff this is NegativeInfinity.

Returns true iff this is NegativeInfinity.

Attributes

Source
Double.scala
Extension method from Double

Returns true iff this is PositiveInfinity.

Returns true iff this is PositiveInfinity.

Attributes

Source
Double.scala
Extension method from Double

Returns true iff this has a zero fractional part, and is within the range of scala.Byte MinValue and MaxValue; otherwise returns false.

Returns true iff this has a zero fractional part, and is within the range of scala.Byte MinValue and MaxValue; otherwise returns false.

Attributes

Source
Double.scala
Extension method from Double

Returns true iff this has a zero fractional part, and is within the range of scala.Char MinValue and MaxValue; otherwise returns false.

Returns true iff this has a zero fractional part, and is within the range of scala.Char MinValue and MaxValue; otherwise returns false.

Attributes

Source
Double.scala
Extension method from Double

Returns true iff this has a zero fractional part, and is within the range of scala.Int MinValue and MaxValue; otherwise returns false.

Returns true iff this has a zero fractional part, and is within the range of scala.Int MinValue and MaxValue; otherwise returns false.

Attributes

Source
Double.scala
Extension method from Double

Returns true iff this has a zero fractional part, and is within the range of scala.Short MinValue and MaxValue; otherwise returns false.

Returns true iff this has a zero fractional part, and is within the range of scala.Short MinValue and MaxValue; otherwise returns false.

Attributes

Source
Double.scala
Extension method from Double

Returns '''true''' if this number is finite and has no decimal component.

Returns '''true''' if this number is finite and has no decimal component.

Attributes

Source
Double.scala
def max(that: Double): Double
Extension method from Double

Returns this if this > that or that otherwise.

Returns this if this > that or that otherwise.

Attributes

Source
Double.scala
def min(that: Double): Double
Extension method from Double

Returns this if this &lt; that or that otherwise.

Returns this if this &lt; that or that otherwise.

Attributes

Source
Double.scala
def round: Long
Extension method from Double

Returns the closest Long to this.

Returns the closest Long to this.

Attributes

Source
Double.scala
def sign: Double
Extension method from Double

Returns the sign of this.

Returns the sign of this.

  • 1.0 if this > 0.0;
  • -1.0 if this &lt; 0.0;
  • this otherwise (for zeros and NaN).

Attributes

Source
Double.scala
Extension method from Double

Converts an angle measured in radians to an approximately equivalent angle measured in degrees.

Converts an angle measured in radians to an approximately equivalent angle measured in degrees.

Attributes

Returns

the measurement of the angle x in degrees.

Source
Double.scala
Extension method from Double

Converts an angle measured in degrees to an approximately equivalent angle measured in radians.

Converts an angle measured in degrees to an approximately equivalent angle measured in radians.

Attributes

Returns

the measurement of the angle x in radians.

Source
Double.scala

Deprecated methods

def +(x: String): String

Attributes

Deprecated
[Since version 2.13.0] Adding a number and a String is deprecated. Use the string interpolation `s\"$num$str\"`
Source
Double.scala
def signum: Int
Extension method from Double

Returns the signum of this.

Returns the signum of this.

Attributes

Deprecated
[Since version 2.13.0] signum does not handle -0.0 or Double.NaN; use `sign` method instead
Source
Double.scala