Companion object for DistanceUnit containing implementations of different distance units and utility methods for distance calculations
Attributes
- Companion
- trait
- Graph
-
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
DistanceUnit.type
Members list
Type members
Classlikes
Represents distance in astronomical units (AU)
Represents distance in astronomical units (AU)
Value parameters
- value
-
the distance value in astronomical units
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait DistanceUnitclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass AnyShow all
- Self type
-
AstronomicalUnit.type
Provides binary operations for DistanceUnit
Provides binary operations for DistanceUnit
Value parameters
- self
-
the DistanceUnit instance on which operations are performed
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Represents distance in kilometers
Represents distance in kilometers
Value parameters
- value
-
the distance value in kilometers
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait DistanceUnitclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrortrait DistanceUnitCompanion[Kilometer]class Objecttrait Matchableclass AnyShow all
- Self type
-
Kilometer.type
Represents distance in meters
Represents distance in meters
Value parameters
- value
-
the distance value in meters
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait DistanceUnitclass Objecttrait Matchableclass AnyShow all
Inherited and Abstract types
The names of the product elements
The names of the product elements
Attributes
- Inherited from:
- Mirror
The name of the type
The name of the type
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
Creates a specific distance unit from meters
Creates a specific distance unit from meters
Type parameters
- T
-
the type of distance unit to create
Value parameters
- meters
-
the distance in meters
- unitFactory
-
the factory function to create the desired unit
Attributes
- Returns
-
distance in the specified unit
Implicits
Implicits
Provides binary operations for DistanceUnit
Provides binary operations for DistanceUnit
Value parameters
- self
-
the DistanceUnit instance on which operations are performed