RealOps

com.phasmidsoftware.number.core.numerical.Real.RealOps
implicit class RealOps(x: Int)

Implicit class to operate on Numbers introduced as integers.

CONSIDER generalizing this to inputs of Values (or Rationals, Doubles).

Value parameters

x

an Int to be treated as a Real.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def *(y: Real): Real

Multiply x by y (a Real) and yield a Real.

Multiply x by y (a Real) and yield a Real.

Value parameters

y

the multiplicand, a Real.

Attributes

Returns

a Real whose value is x * y.

def +(y: Real): Real

Add this x (a Real) and yield a Real.

Add this x (a Real) and yield a Real.

Value parameters

y

the addend, a Real.

Attributes

Returns

a Real whose value is x + y.

def /(y: Real): Real

Divide x by y (a Real) and yield a Real.

Divide x by y (a Real) and yield a Real.

Value parameters

y

the divisor, a Real.

Attributes

Returns

a Real whose value is x / y.

def :/(y: Int): Real

Divide x by y (an Int) and yield a Real. NOTE: the colon is necessary in order to coerce the left hand operand to be a Real.

Divide x by y (an Int) and yield a Real. NOTE: the colon is necessary in order to coerce the left hand operand to be a Real.

Value parameters

y

the divisor, an Int.

Attributes

Returns

a Real whose value is x / y.