Package

io.github.karols

units

Permalink

package units

Main package of the library.

Importing io.github.karols.units._ brings into scope most of its features.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. units
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type /[U <: MUnit, V <: MUnit] = units./.U.Mul[units./.V.Invert]

    Permalink

    Unit division.

  2. type ><[U <: MUnit, V <: MUnit] = units.><.U.Mul[V]

    Permalink

    Unit multiplication.

  3. type @@[N, U <: MUnit] = WithU[N, U]

    Permalink
  4. trait AffineSpace extends AnyRef

    Permalink

    Supertype of all affine spaces.

    Supertype of all affine spaces.

    Affine space is similar to a vector space, but it does not contain a distinguished origin point. In order to manipulate points from the affine space, we have to pick the origin (aka the zero point) ourselves.

    Examples of affine spaces are temperature scales, time, (physical) space, and so on.

  5. final case class DoubleA[A <: AffineSpace](value: Double) extends AnyVal with Product with Serializable

    Permalink

    Double-precision floating-point value representing a point in a 1-dimensional affine space.

  6. type DoubleAffineSpaceConverter[T1 <: AffineSpace, T2 <: AffineSpace] = units.internal.ratios.DoubleAffineSpaceConverter[T1, T2]

    Permalink
  7. type DoubleRatio[U <: MUnit, V <: MUnit] = units.internal.ratios.DoubleRatio[U, V]

    Permalink
  8. final case class DoubleU[U <: MUnit](value: Double) extends AnyVal with Product with Serializable

    Permalink

    Double-precision floating-point value representing a value with a unit of measure.

  9. implicit final class DoubleUBuilder extends AnyVal

    Permalink

    Extention methods for Double.

  10. final case class IntA[A <: AffineSpace](value: Long) extends AnyVal with Product with Serializable

    Permalink

    64-bit signed integer representing a point in a 1-dimensional affine space.

  11. type IntAffineSpaceConverter[T1 <: AffineSpace, T2 <: AffineSpace] = units.internal.ratios.IntAffineSpaceConverter[T1, T2]

    Permalink
  12. type IntRatio[U <: MUnit, V <: MUnit] = units.internal.ratios.IntRatio[U, V]

    Permalink
  13. final case class IntU[U <: MUnit](value: Long) extends AnyVal with Product with Serializable

    Permalink

    64-bit signed integer representing a value with a unit of measure.

  14. implicit final class IntUBuilder extends AnyVal

    Permalink

    Extention methods for Long.

  15. trait MUnit extends AnyRef

    Permalink

    Supertype of all units of measure.

  16. final class System1[U1 <: TSingleUnit, V1 <: MUnit] extends AnyVal

    Permalink

    Represents a system of units of measurements consisting of 1 unit.

  17. final class System2[U1 <: TSingleUnit, V1 <: MUnit, U2 <: TSingleUnit, V2 <: MUnit] extends AnyVal

    Permalink

    Represents a system of units of measurements consisting of 2 units.

  18. final class System3[U1 <: TSingleUnit, V1 <: MUnit, U2 <: TSingleUnit, V2 <: MUnit, U3 <: TSingleUnit, V3 <: MUnit] extends AnyVal

    Permalink

    Represents a system of units of measurements consisting of 3 units.

  19. final class System4[U1 <: TSingleUnit, V1 <: MUnit, U2 <: TSingleUnit, V2 <: MUnit, U3 <: TSingleUnit, V3 <: MUnit, U4 <: TSingleUnit, V4 <: MUnit] extends AnyVal

    Permalink

    Represents a system of units of measurements consisting of 4 units.

  20. final class System5[U1 <: TSingleUnit, V1 <: MUnit, U2 <: TSingleUnit, V2 <: MUnit, U3 <: TSingleUnit, V3 <: MUnit, U4 <: TSingleUnit, V4 <: MUnit, U5 <: TSingleUnit, V5 <: MUnit] extends AnyVal

    Permalink

    Represents a system of units of measurements consisting of 5 units.

  21. final class System6[U1 <: TSingleUnit, V1 <: MUnit, U2 <: TSingleUnit, V2 <: MUnit, U3 <: TSingleUnit, V3 <: MUnit, U4 <: TSingleUnit, V4 <: MUnit, U5 <: TSingleUnit, V5 <: MUnit, U6 <: TSingleUnit, V6 <: MUnit] extends AnyVal

    Permalink

    Represents a system of units of measurements consisting of 6 units.

  22. final class System7[U1 <: TSingleUnit, V1 <: MUnit, U2 <: TSingleUnit, V2 <: MUnit, U3 <: TSingleUnit, V3 <: MUnit, U4 <: TSingleUnit, V4 <: MUnit, U5 <: TSingleUnit, V5 <: MUnit, U6 <: TSingleUnit, V6 <: MUnit, U7 <: TSingleUnit, V7 <: MUnit] extends AnyVal

    Permalink

    Represents a system of units of measurements consisting of 7 units.

  23. final class System8[U1 <: TSingleUnit, V1 <: MUnit, U2 <: TSingleUnit, V2 <: MUnit, U3 <: TSingleUnit, V3 <: MUnit, U4 <: TSingleUnit, V4 <: MUnit, U5 <: TSingleUnit, V5 <: MUnit, U6 <: TSingleUnit, V6 <: MUnit, U7 <: TSingleUnit, V7 <: MUnit, U8 <: TSingleUnit, V8 <: MUnit] extends AnyVal

    Permalink

    Represents a system of units of measurements consisting of 8 units.

  24. implicit final class UnitNameBuilder extends AnyVal

    Permalink
    Annotations
    @inline()
  25. case class Vector2A[A <: AffineSpace](x: DoubleA[A], y: DoubleA[A]) extends Product with Serializable

    Permalink

    A two-dimensional vector within an affine space

  26. case class Vector2U[U <: MUnit](x: DoubleU[U], y: DoubleU[U]) extends Product with Serializable

    Permalink

    A two-dimensional vector with a unit

  27. class Vector2UBuilder extends AnyRef

    Permalink
  28. case class Vector3A[A <: AffineSpace](x: DoubleA[A], y: DoubleA[A], z: DoubleA[A]) extends Product with Serializable

    Permalink

    A three-dimensional vector within an affine space

  29. case class Vector3U[U <: MUnit](x: DoubleU[U], y: DoubleU[U], z: DoubleU[U]) extends Product with Serializable

    Permalink

    A three-dimensional vector with a unit

  30. class Vector3UBuilder extends AnyRef

    Permalink
  31. case class WithA[N, A <: AffineSpace](value: N) extends Product with Serializable

    Permalink

    A value within an affine space.

    A value within an affine space.

    Warning: this is an experimental feature and may be subject to removal or severe redesign.

  32. case class WithU[N, U <: MUnit](value: N) extends Product with Serializable

    Permalink

    A value with a unit of measure.

    A value with a unit of measure.

    Warning: this is an experimental feature and may be subject to removal or severe redesign.

  33. implicit final class WithUBuilder[N] extends AnyVal

    Permalink

    Extension methods for everything

  34. type _1 = TDimensionless

    Permalink

    Unit dimensionless values have, which is 1.

  35. type cube[U <: MUnit] = units.cube.U.ToPower[P3]

    Permalink

    Takes unit to the third power.

  36. type inverse[U <: MUnit] = units.inverse.U.Invert

    Permalink

    Gets inverse of a unit.

    Gets inverse of a unit. inverse[second] is equivalent to hertz.

  37. type inverseCube[U <: MUnit] = units.inverseCube.U.ToPower[N3]

    Permalink

    Gets inverse of the third power a unit.

  38. type inversePower4[U <: MUnit] = units.inversePower4.U.ToPower[N4]

    Permalink

    Gets inverse of the fourth power a unit.

  39. type inversePower5[U <: MUnit] = units.inversePower5.U.ToPower[N5]

    Permalink

    Gets inverse of the fifth power a unit.

  40. type inverseSquare[U <: MUnit] = units.inverseSquare.U.ToPower[N2]

    Permalink

    Gets inverse of the second power a unit.

  41. type power4[U <: MUnit] = units.power4.U.ToPower[P4]

    Permalink

    Takes unit to the fourth power.

  42. type power5[U <: MUnit] = units.power5.U.ToPower[P5]

    Permalink

    Takes unit to the fifth power.

  43. type square[U <: MUnit] = units.square.U.ToPower[P2]

    Permalink

    Takes unit to the second power.

  44. type ×[U <: MUnit, V <: MUnit] = units.×.U.Mul[V]

    Permalink

    Unit multiplication.

Value Members

  1. object Currency

    Permalink

    Some of currencies of the world.

  2. object DoubleA extends Serializable

    Permalink
  3. object DoubleU extends Serializable

    Permalink
  4. object Information

    Permalink

    Units of information.

  5. object IntA extends Serializable

    Permalink
  6. object IntU extends Serializable

    Permalink
  7. object Mechanical

    Permalink

    Abstract definition of mechanical units, for use with explicit polymorphism.

  8. object SI

    Permalink

    SI units.

  9. object System1

    Permalink
  10. object System2

    Permalink
  11. object System3

    Permalink
  12. object System4

    Permalink
  13. object System5

    Permalink
  14. object System6

    Permalink
  15. object System7

    Permalink
  16. object System8

    Permalink
  17. object USCustomary

    Permalink

    US customary and British units and their conversions to SI.

  18. object Vector2A extends Serializable

    Permalink
  19. object Vector2U extends Serializable

    Permalink
  20. object Vector3A extends Serializable

    Permalink
  21. object Vector3U extends Serializable

    Permalink
  22. object WithA extends Serializable

    Permalink
  23. object WithU extends Serializable

    Permalink
  24. package arrays

    Permalink
  25. package constants

    Permalink
  26. package defining

    Permalink

    Package containing helper types and methods for defining new units and ratios between units.

    Package containing helper types and methods for defining new units and ratios between units.

    It also contains a set of type-level characters, used for defining type-level unit identifiers.

    Usage:

    import io.github.karols.units.defining._

  27. implicit def implicit_dimensionless2DoubleUBuilder(value: DoubleU[_1]): DoubleUBuilder

    Permalink
    Annotations
    @inline()
  28. implicit def implicit_dimensionless2IntUBuilder(value: IntU[_1]): IntUBuilder

    Permalink
    Annotations
    @inline()
  29. implicit def implicit_dimensionless2Vector2UBuilder(value: Vector2U[_1]): Vector2UBuilder

    Permalink
    Annotations
    @inline()
  30. implicit def implicit_dimensionless2Vector3UBuilder(value: Vector3U[_1]): Vector3UBuilder

    Permalink
    Annotations
    @inline()
  31. implicit def implicit_float2DoubleUBuilder(value: Float): DoubleUBuilder

    Permalink
    Annotations
    @inline()
  32. implicit def implicit_fromDimensionlessDouble(i: DoubleU[_1]): Double

    Permalink
    Annotations
    @inline()
  33. implicit def implicit_fromDimensionlessInt(i: IntU[_1]): Long

    Permalink
    Annotations
    @inline()
  34. implicit def implicit_fromDimensionlessTuple(i: Vector3U[_1]): (Double, Double, Double)

    Permalink
    Annotations
    @inline()
  35. implicit def implicit_int2IntUBuilder(value: Int): IntUBuilder

    Permalink
    Annotations
    @inline()
  36. implicit def implicit_toDimensionlessDouble(i: Double): DoubleU[_1]

    Permalink
    Annotations
    @inline()
  37. implicit def implicit_toDimensionlessFloat(i: Float): DoubleU[_1]

    Permalink
    Annotations
    @inline()
  38. implicit def implicit_toDimensionlessInt(i: Int): IntU[_1]

    Permalink
    Annotations
    @inline()
  39. implicit def implicit_toDimensionlessLong(i: Long): IntU[_1]

    Permalink
    Annotations
    @inline()
  40. implicit def implicit_toDimensionlessTupleDDD(i: (Double, Double, Double)): Vector3U[_1]

    Permalink
    Annotations
    @inline()
  41. implicit def implicit_toDimensionlessTupleIII(i: (Int, Int, Int)): Vector3U[_1]

    Permalink
    Annotations
    @inline()
  42. implicit def implicit_tupleDD2Vector2UBuilder(value: (Double, Double)): Vector2UBuilder

    Permalink
    Annotations
    @inline()
  43. implicit def implicit_tupleDDD2Vector3UBuilder(value: (Double, Double, Double)): Vector3UBuilder

    Permalink
    Annotations
    @inline()
  44. implicit def implicit_tupleII2Vector2UBuilder(value: (Int, Int)): Vector2UBuilder

    Permalink
    Annotations
    @inline()
  45. implicit def implicit_tupleIII2Vector3UBuilder(value: (Int, Int, Int)): Vector3UBuilder

    Permalink
    Annotations
    @inline()
  46. implicit def implicit_widening[U <: MUnit](i: IntU[U]): DoubleU[U]

    Permalink
    Annotations
    @inline()
  47. implicit def implicit_wideningA[A <: AffineSpace](i: IntA[A]): DoubleA[A]

    Permalink
    Annotations
    @inline()
  48. package internal

    Permalink
  49. package utils

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped