ExtraImplicits

scala.math.Numeric.ExtraImplicits

Attributes

Source
Numeric.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Implicits

Members list

Implicits

Implicits

implicit def infixNumericOps[T](x: T)(implicit num: Numeric[T]): Numeric[T]#NumericOps

These implicits create conversions from a value for which an implicit Numeric exists to the inner class which creates infix operations. Once imported, you can write methods as follows:

These implicits create conversions from a value for which an implicit Numeric exists to the inner class which creates infix operations. Once imported, you can write methods as follows:

def plus[T: Numeric](x: T, y: T) = x + y

Type parameters

T

the numeric type for which a Numeric instance exists

Value parameters

num

the implicit Numeric instance that provides the arithmetic operations

x

the value to wrap with numeric infix operations

Attributes

Source
Numeric.scala