AngleUnit

org.abh80.nf.core.metrics.AngleUnit
See theAngleUnit companion object
sealed trait AngleUnit

Represents an angle unit with a value and provides conversion to radians.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ArcMinute
class ArcSecond
class Degree
class HourAngle
class Radian

Members list

Value members

Abstract methods

def fromRadians(rad: Double): AngleUnit

Creates a new instance of this unit from a value in radians.

Creates a new instance of this unit from a value in radians.

Value parameters

rad

the angle in radians

Attributes

Returns

a new instance of this angle unit

def symbol: String

The symbol for display (e.g., "rad", "degree").

The symbol for display (e.g., "rad", "degree").

Attributes

def toRadians: Double

Converts this angle to radians.

Converts this angle to radians.

Attributes

Returns

the angle in radians

def value: Double

The numerical value in this unit (e.g., 10 degrees or 2.5 radians).

The numerical value in this unit (e.g., 10 degrees or 2.5 radians).

Attributes

Concrete methods

def *(second: AngleUnit): AngleUnit
Implicitly added by BinOp

Multiplies two angle units.

Multiplies two angle units.

Value parameters

second

the other angle unit

Attributes

Returns

the product as an AngleUnit

def +(second: AngleUnit): AngleUnit
Implicitly added by BinOp

Adds two angle units.

Adds two angle units.

Value parameters

second

the other angle unit

Attributes

Returns

the sum as an AngleUnit

def -(second: AngleUnit): AngleUnit
Implicitly added by BinOp

Subtracts one angle unit from another.

Subtracts one angle unit from another.

Value parameters

second

the other angle unit

Attributes

Returns

the difference as an AngleUnit

def /(second: AngleUnit): AngleUnit
Implicitly added by BinOp

Divides one angle unit by another.

Divides one angle unit by another.

Value parameters

second

the other angle unit

Attributes

Returns

the quotient as an AngleUnit

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
def ~(second: AngleUnit, epsilon: Double): Boolean
Implicitly added by BinOp

Compares two angle units for approximate equality.

Compares two angle units for approximate equality.

Value parameters

epsilon

the tolerance for comparison

second

the other angle unit

Attributes

Returns

true if the difference is less than epsilon, false otherwise