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

@scala.annotation.targetName("remainder")
inline def %(inline v: A | 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
@scala.annotation.targetName("multiply")
inline def *(inline v: A | Byte | Short | Int | Long | Float | Double): Percent

Multiply

Multiply

Returns the product of this and given value

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

Plus

Plus

Returns the sum of this and given value

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

Minus

Minus

Returns difference of this and given value

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

Divide

Divide

Returns the quotient of this and given value

Inherited from
_methods
Source
Numerical.scala
@scala.annotation.targetName("less")
inline def <(inline v: A | 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
@scala.annotation.targetName("less")
inline def <(inline v: A): Boolean

Less

Less

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

Inherited from
_methods
Source
Ordered.scala
@scala.annotation.targetName("lessOrEqual")
inline def <=(inline v: A | 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
@scala.annotation.targetName("lessOrEqual")
inline def <=(inline v: A): 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
@scala.annotation.targetName("range")
inline def <>(inline to: Double.G.<>[Percent]

Range

Range

Returns Range from current to given value

Note. Range uses base primitive natural ordering

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

Exclusive end range

Exclusive end range

Returns Range from current to given value exclusive

Note. Range uses base primitive natural ordering

Inherited from
zMethodsBase
Source
Ordered.scala
@scala.annotation.targetName("greater")
inline def >(inline v: A | 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
@scala.annotation.targetName("greater")
inline def >(inline v: A): Boolean

Greater

Greater

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

Inherited from
_methods
Source
Ordered.scala
@scala.annotation.targetName("greaterOrEqual")
inline def >=(inline v: A | 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
@scala.annotation.targetName("greaterOrEqual")
inline def >=(inline v: A): 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
inline def abs: Percent
Inherited from
_methods
Source
Numerical.scala
inline def apply(inline nv: Int): Int

Take percent

Take percent

Applies this percent to given value.

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

Take percent

Take percent

Applies this percent to given value.

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

Take percent

Take percent

Applies this percent to given value.

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

Take percent

Take percent

Applies this percent to given value.

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

Take percent

Take percent

Applies this percent to given value.

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

Take percent

Take percent

Applies this percent to given value.

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

Take percent

Take percent

Applies this percent to given value.

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

Take percent

Take percent

Applies this percent to given value.

Source
Percent.scala
inline def atLeast(v: Percent

Max

Max

Returns maximum of current or given value

Inherited from
zMethodsBase
Source
Ordered.scala
inline def atMost(v: Percent

Min

Min

Returns minimun of current or given value

Inherited from
zMethodsBase
Source
Ordered.scala
inline def Byte: Byte

Make Byte

Make Byte

Attached Byte constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Char: Char

Make Char

Make Char

Attached Char constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Double: Double

Make Double

Make Double

Returnes underlying value

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Float: Float

Make Float

Make Float

Attached Float constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Int: Int

Make Int

Make Int

Attached Int constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Long: Long

Make Long

Make Long

Attached Long constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Number: java.lang.Double

Make Number

Make Number

Attached Number constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def real: Double

Real value

Real value

Returns real value standing behind the opaque type

Inherited from
_methods
Source
__.scala
inline def roundDecimal(inline d: Int)(using inline r: Rounding): Percent
Inherited from
_methods
Source
Numerical.scala
inline def roundTo(inline size: A)(using inline r: Rounding): Percent

Round to size

Round to size

Rounds current value to specified size

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

Make Short

Make Short

Attached Short constructor

Inherited from
toPrimitives
Source
toPrimitives.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 unary_-: Percent

Negate

Negate

Returns negation of this value

Inherited from
_methods
Source
Numerical.scala

Implicit

implicit inline def implicitRequest(inline v: \/): Percent