⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 richdouble.scala

📁 JAVA 语言的函数式编程扩展
💻 SCALA
字号:
/*                     __                                               *\**     ________ ___   / /  ___     Scala API                            ****    / __/ __// _ | / /  / _ |    (c) 2002-2007, LAMP/EPFL             ****  __\ \/ /__/ __ |/ /__/ __ |    http://scala-lang.org/               **** /____/\___/_/ |_/____/_/ | |                                         ****                          |/                                          **\*                                                                      */// $Id: RichDouble.scala 14416 2008-03-19 01:17:25Z mihaylov $package scala.runtimefinal class RichDouble(x: Double) extends Proxy with Ordered[Double] {  // Proxy.self  def self: Any = x  // Ordered[Double].compare  def compare(y: Double): Int = if (x < y) -1 else if (x > y) 1 else 0  def min(y: Double): Double = Math.min(x, y)  def max(y: Double): Double = Math.max(x, y)  def abs: Double = Math.abs(x)  def round: Long = Math.round(x)  def ceil: Double = Math.ceil(x)  def floor: Double = Math.floor(x)  /** Converts an angle measured in degrees to an approximately equivalent   *  angle measured in radians.   *   *  @param  x an angle, in degrees   *  @return the measurement of the angle <code>x</code> in radians.   */  def toRadians: Double = Math.toRadians(x)  /** Converts an angle measured in radians to an approximately equivalent   *  angle measured in degrees.   *   *  @param  x angle, in radians   *  @return the measurement of the angle <code>x</code> in degrees.   */  def toDegrees: Double = Math.toDegrees(x)  def isNaN: Boolean = System.Double.IsNaN(x)  def isInfinity: Boolean = System.Double.IsInfinity(x)  def isPosInfinity: Boolean = System.Double.IsPositiveInfinity(x)  def isNegInfinity: Boolean = System.Double.IsNegativeInfinity(x)}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -