Percent

opaque type Percent

Percent is an opaque Double value

Percent can be created with method constructors on primitives

 3.Percent.tp     // Prints: 3.0%
 3.14.Percent.tp  // Prints: 3.14%
Source
Percent.scala

Def

@targetName("remainder")
inline def %(v: Percent | Byte | Short | Int | Long | Float | Double): Percent

Remainder

Remainder

Returns the remainder of the division of this by given value

Inherited from
_methods
Source
Numerical.scala
@targetName("multiply")
inline def *(v: Percent | Byte | Short | Int | Long | Float | Double): Percent

Multiply

Multiply

Returns the product of this and given value

Inherited from
_methods
Source
Numerical.scala
@targetName("plus")
inline def +(v: Percent | Byte | Short | Int | Long | Float | Double): Percent

Plus

Plus

Returns the sum of this and given value

Inherited from
_methods
Source
Numerical.scala
@targetName("minus")
inline def -(v: Percent | Byte | Short | Int | Long | Float | Double): Percent

Minus

Minus

Returns difference of this and given value

Inherited from
_methods
Source
Numerical.scala
@targetName("divide")
inline def /(v: Percent | Byte | Short | Int | Long | Float | Double): Percent

Divide

Divide

Returns the quotient of this and given value

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

Less

Less

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

Inherited from
_methods
Source
Numerical.scala
@targetName("less")
inline def <(v: Percent): Boolean

Less

Less

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

Inherited from
_methods
Source
Ordered.scala
@targetName("lessOrEqual")
inline def <=(v: Percent | 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

Inherited from
_methods
Source
Numerical.scala
@targetName("lessOrEqual")
inline def <=(v: Percent): Boolean

Less or equal

Less or equal

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

Inherited from
_methods
Source
Ordered.scala
@targetName("range")
inline def <>(to: Double.G.Range[Percent]

Range

Range

Returns Range from current to given value

Note. Range uses base primitive natural ordering

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

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: Percent | Byte | Short | Int | Long | Float | Double): Boolean

Greater

Greater

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

Inherited from
_methods
Source
Numerical.scala
@targetName("greater")
inline def >(v: Percent): Boolean

Greater

Greater

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

Inherited from
_methods
Source
Ordered.scala
@targetName("greaterOrEqual")
inline def >=(v: Percent | 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

Inherited from
_methods
Source
Numerical.scala
@targetName("greaterOrEqual")
inline def >=(v: Percent): Boolean

Greater or equal

Greater or equal

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

Inherited from
_methods
Source
Ordered.scala
@targetName("Opt")
inline def ?: Double.G.Opt[Percent]

To option

To option

Returns Double specialized option

Inherited from
_methods
Source
Base.scala
inline def abs: Percent
Inherited from
_methods
Source
Numerical.scala
inline def apply(nv: Int): Int

Take percent

Take percent

Applies this percent to given value.

Source
Percent.scala
inline def apply(nv: Long): Long

Take percent

Take percent

Applies this percent to given value.

Source
Percent.scala
inline def apply(nv: Float): Float

Take percent

Take percent

Applies this percent to given value.

Source
Percent.scala
@targetName("applyDouble")
inline def apply(nv: Double): Double

Take percent

Take percent

Applies this percent to given value.

Source
Percent.scala
inline def apply(nv: A)(using n: scala.math.Numeric[A]): A

Take percent

Take percent

Applies this percent to given value.

Source
Percent.scala
inline def apply(nv: A)(using n: scala.math.Numeric[A]): A

Take percent

Take percent

Applies this percent to given value.

Source
Percent.scala
inline def apply(nv: A)(using n: scala.math.Numeric[A]): A

Take percent

Take percent

Applies this percent to given value.

Source
Percent.scala
inline def apply(nv: A)(using n: scala.math.Numeric[A]): A

Take percent

Take percent

Applies this percent to given value.

Source
Percent.scala
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: Double

Real value

Real value

Returns Double value standing behind the opaque type.

This is a zero cost call.

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

Round to size

Round to size

Rounds current value to specified size

Inherited from
_methods
Source
Numerical.scala
inline def roundToDecimal(d: Int)(using r: Math.Rounding): Percent

Round to decimal

Round to decimal

Rounds current value to specified decimal position of fractional value

Inherited from
_methods
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

Inherited from
_methods
Source
Numerical.scala
inline def toByte: Byte

Make Byte

Make Byte

Attached Byte constructor

Inherited from
_methods
Source
Numerical.scala
inline def toChar: Char

Make Char

Make Char

Attached Char constructor

Inherited from
_methods
Source
Numerical.scala
inline def toDouble: Double

Make Double

Make Double

Returns underlying value

Inherited from
_methods
Source
Numerical.scala
inline def toFloat: Float

Make Float

Make Float

Attached Float constructor

Inherited from
_methods
Source
Numerical.scala
inline def toInt: Int

Make Int

Make Int

Attached Int constructor

Inherited from
_methods
Source
Numerical.scala
inline def toLong: Long

Make Long

Make Long

Attached Long constructor

Inherited from
_methods
Source
Numerical.scala
inline def toNumber: java.lang.Double

Make Number

Make Number

Attached Number constructor

Inherited from
_methods
Source
Numerical.scala
inline def toShort: Short

Make Short

Make Short

Attached Short constructor

Inherited from
_methods
Source
Numerical.scala
inline def unary_-: Percent

Negate

Negate

Returns negation of this value

Inherited from
_methods
Source
Numerical.scala