Packages

c

ostrat

IntExtensions

final class IntExtensions extends AnyVal

Extension methods for Int.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IntExtensions
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new IntExtensions(thisInt: Int)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##: Int
    Definition Classes
    Any
  3. def %%(divisor: Int): Int

    More useful definition of modulus where a negative number divided by a positive divisor produces a non negative modulus.

  4. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def atLeast0: Int

    Returns the value or 0, if this Int less than 0.

  7. def atMost0: Int

    Returns the value or 0, if this Int more than 0.

  8. def billion: Long
  9. def commaInts(otherInts: Int*): String
  10. def degsToRadians: Double

    Takes this Int as a value in arc degrees and converts it to a value of radians.

    Takes this Int as a value in arc degrees and converts it to a value of radians.

    Annotations
    @inline()
  11. def degsToSecs: Int

    Takes this Int as a value in arc degrees and converts it to a value of arc seconds.

    Takes this Int as a value in arc degrees and converts it to a value of arc seconds.

    Annotations
    @inline()
  12. def diff(operand: Int): Int
  13. def div2: Int
  14. def div2RoundDown: Int
  15. def div2RoundUp: Int
  16. def div4: Int
  17. def div4Rem0: Boolean

    Dividing by 4 gives remainder of 0.

  18. def div4Rem1: Boolean
  19. def div4Rem2: Boolean

    Dividing by 4 gives remainder of 2.

  20. def div4Rem3: Boolean
  21. def div8Rem2: Boolean
  22. def div8Rem4: Boolean
  23. def div8Rem6: Boolean
  24. def divRoundUp(operand: Int): Int

    Divides rounding up.

    Divides rounding up. 11.divRoundUp(10) == 2;

  25. def doTimes(f: () => Unit): Unit
  26. def foldTo[A](toValue: Int, initialValue: A)(f: (A, Int) => A): A

    folds across the Integer range starting with this Int to the given end of range.

  27. def foldUntil[A](untilValue: Int, initialValue: A)(f: (A, Int) => A): A

    folds across the Integer range starting with this Int until the given end of range.

  28. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  29. def hexStr: String
    Annotations
    @inline()
  30. def hexStr2: String
    Annotations
    @inline()
  31. def hundredthsStr(hundreds: Int): String
  32. def if0Else[A](vZero: => A, vNonZero: => A): A

    Returns the first lazily evaluated parameter if this Int is 0 else returns the second lazily evaluated parameter.

  33. def ifEvenElse[A](vEven: => A, vOdd: => A): A

    Returns the first lazily evaluated parameter if this Int is even else returns the second lazily evaluated parameter.

  34. def ifMod(predicate: Boolean, f: (Int) => Int): Int

    if the predicate is true apply the function to this Int, else return thisInt unmodified.

    if the predicate is true apply the function to this Int, else return thisInt unmodified.

    Annotations
    @inline()
  35. def ifOddElse[A](vOdd: => A, vEven: => A): A

    Returns the first lazily evaluated parameter if this Int is odd else returns the second lazily evaluated parameter.

  36. def ifSumEven[A](evenVal: => A, oddVal: => A, operand: Int): A
  37. def ifSumOdd[A](oddVal: => A, evenVal: => A, operand: Int): A
  38. def isDivBy3: Boolean
  39. def isDivBy8: Boolean
  40. def isEven: Boolean

    Returns true if this Int is even, false if this Int is odd.

  41. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  42. def isOdd: Boolean

    Returns true if this Int is even, false if this Int is odd.

  43. def million: Int
  44. def power(operand: Int): Int

    Only use positive value that won't overflow int)

  45. def quadrillion: Long
  46. def radiansToDegs: Double

    Takes this Int as a value in radians and converts it to a value of arc degrees.

    Takes this Int as a value in radians and converts it to a value of arc degrees.

    Annotations
    @inline()
  47. def radiansToSecs: Double

    Takes this Int as a value in radians and converts it to a value of arc seconds.

    Takes this Int as a value in radians and converts it to a value of arc seconds.

    Annotations
    @inline()
  48. def roundDownTo(f: (Int) => Boolean): Int

    Decrements the value of an integer while that integer does not match condition.

    Decrements the value of an integer while that integer does not match condition. Not guaranteed to terminate.

  49. def roundDownToEven: Int
  50. def roundDownToOdd: Int
  51. def roundUpTo(f: (Int) => Boolean): Int

    Increments the value of an integer while that integer does not match condition.

    Increments the value of an integer while that integer does not match condition. Not guaranteed to terminate.

  52. def roundUpToEven: Int
  53. def roundUpToOdd: Int
  54. def secsToDegs: Double

    Takes this Int as a value in arc deconds and converts it to a value of arc degrees.

    Takes this Int as a value in arc deconds and converts it to a value of arc degrees.

    Annotations
    @inline()
  55. def secsToRadians: Double

    Takes this Int as a value in arc seconds and converts it to a value of radians.

    Takes this Int as a value in arc seconds and converts it to a value of radians.

    Annotations
    @inline()
  56. def semicolonInts(otherInts: Int*): String
  57. def spaces: String
  58. def str2Dig: String
  59. def tenthsStr(tenths: Int): String
  60. val thisInt: Int
  61. def toString(): String
    Definition Classes
    Any
  62. def trillion: Long

Inherited from AnyVal

Inherited from Any

Ungrouped