ArithΒΆ

Type class used to supply evidence that type T has basic arithmetic operations defined on it.


Abstract methods

trait Arith[T]
def negate(x: T): T
Returns the negation of the given value.
def plus(x: T, y: T): T
Returns the result of adding x and y.
def minus(x: T, y: T): T
Returns the result of subtracting y from x.
def times(x: T, y: T): T
Returns the result of multiplying x and y.
def divide(x: T, y: T): T
Returns the result of dividing x by y.