_methods

trait _methods extends _methods

Default methods for all Short.Opaque.Data.Numerical defined types

Source
Numerical.scala
trait _methods
trait _methods
class java.lang.Object
trait scala.Matchable
class Any
class Short.Opaque.Data.Numerical[Short.Opaque.Data.Numerical.A]

Def

@targetName("remainder")
inline def %(v: THIS_OPAQUE | Byte | Short): THIS_OPAQUE

Remainder

Remainder

Returns the remainder of the division of this by given value

Source
Numerical.scala
@targetName("multiply")
inline def *(v: THIS_OPAQUE | Byte | Short): THIS_OPAQUE

Multiply

Multiply

Returns the product of this and given value

Source
Numerical.scala
@targetName("plus")
inline def +(v: THIS_OPAQUE | Byte | Short): THIS_OPAQUE

Plus

Plus

Returns the sum of this and given value

Source
Numerical.scala
@targetName("minus")
inline def -(v: THIS_OPAQUE | Byte | Short): THIS_OPAQUE

Minus

Minus

Returns difference of this and given value

Source
Numerical.scala
@targetName("divide")
inline def /(v: THIS_OPAQUE | Byte | Short): THIS_OPAQUE

Divide

Divide

Returns the quotient of this and given value

Source
Numerical.scala
@targetName("less")
inline def <(v: THIS_OPAQUE | Byte | Short | Int | Long | Float | Double): Boolean

Less

Less

Returns true if current value is less than given, false - otherwise

Source
Numerical.scala
@targetName("lessOrEqual")
inline def <=(v: THIS_OPAQUE | Byte | Short | Int | Long | Float | Double): Boolean

Less or equal

Less or equal

Returns true if current value is less or equal to given, false - otherwise

Source
Numerical.scala
@targetName("range")
inline def <>(to: Short.G.Range[THIS_OPAQUE]

Range

Range

Returns Range from current to given value

Note. Range uses base primitive natural ordering

Inherited from
z_MethodsBase
Source
Ordered.scala
@targetName("rangeOfSize")
inline def <>=(sz: Int): Short.G.Range[THIS_OPAQUE]

Range by size

Range by size

Returns Range from current value to current plus given size exclusive

Note. Range uses base primitive natural ordering

Inherited from
z_MethodsBase
Source
Ordered.scala
@targetName("rangeX")
inline def <>>(to: Short.G.Range[THIS_OPAQUE]

Exclusive end range

Exclusive end range

Returns Range from current to given value exclusive

Note. Range uses base primitive natural ordering

Inherited from
z_MethodsBase
Source
Ordered.scala
@targetName("greater")
inline def >(v: THIS_OPAQUE | Byte | Short | Int | Long | Float | Double): Boolean

Greater

Greater

Returns true if current value is greater than given, false - otherwise

Source
Numerical.scala
@targetName("greaterOrEqual")
inline def >=(v: THIS_OPAQUE | Byte | Short | Int | Long | Float | Double): Boolean

Greater or equal

Greater or equal

Returns true if current value is greater or equal to given, false - otherwise

Source
Numerical.scala
@targetName("Opt")
inline def ?: Short.G.Opt[THIS_OPAQUE]

To option

To option

Returns Short specialized option

Inherited from
_methods
Source
Base.scala
inline def abs: THIS_OPAQUE
inline def max(v:

Max value

Max value

Returns maximum of current or given value

Inherited from
z_MethodsBase
Source
Ordered.scala
inline def min(v:

Min value

Min value

Returns minimun of current or given value

Inherited from
z_MethodsBase
Source
Ordered.scala
inline def real: Short

Real value

Real value

Returns Short value standing behind the opaque type.

This is a zero cost call.

Inherited from
_methods
Source
Base.scala
inline def roundTo(unit: THIS_OPAQUE)(using r: Math.Rounding): THIS_OPAQUE

Round to size

Round to size

Rounds current value to specified size

Source
Numerical.scala
inline def sign: Int

Sign

Sign

Returns -1 if this is negative, 0 - if this value equals to 0, and 1 otherwise

Source
Numerical.scala
inline def toByte: Byte

Make Byte

Make Byte

Attached Byte constructor

Source
Numerical.scala
inline def toChar: Char

Make Char

Make Char

Attached Char constructor

Source
Numerical.scala
inline def toDouble: Double

Make Double

Make Double

Attached Double constructor

Source
Numerical.scala
inline def toFloat: Float

Make Float

Make Float

Attached Float constructor

Source
Numerical.scala
inline def toInt: Int

Make Int

Make Int

Attached Int constructor

Source
Numerical.scala
inline def toLong: Long

Make Long

Make Long

Attached Long constructor

Source
Numerical.scala
inline def toNumber: java.lang.Short

Make Number

Make Number

Attached Number constructor

Source
Numerical.scala
inline def toShort: Short

Make Short

Make Short

Returns underlying value

Source
Numerical.scala
inline def unary_-: THIS_OPAQUE

Negate

Negate

Returns negation of this value

Source
Numerical.scala