angleIsCommutativeGroup

com.phasmidsoftware.number.algebra.eager.Angle.angleIsCommutativeGroup
object angleIsCommutativeGroup extends AdditiveCommutativeGroup[Angle]

Provides an implicit implementation of a commutative group for the Angle type, supporting group operations such as identity, combination, and inversion.

This allows Angle objects to adhere to the algebraic structure of a commutative group, where the combine operation is associative and commutative, an identity element exists, and each element has an additive inverse.

Attributes

Graph
Supertypes
trait AdditiveCommutativeGroup[Angle]
trait AdditiveCommutativeMonoid[Angle]
trait AdditiveCommutativeSemigroup[Angle]
trait AdditiveGroup[Angle]
trait AdditiveMonoid[Angle]
trait AdditiveSemigroup[Angle]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type

Members list

Value members

Concrete methods

def negate(a: Angle): Angle

Computes the additive inverse of the given Angle.

Computes the additive inverse of the given Angle.

This method negates the input angle, returning an Angle instance that represents its additive inverse, relative to Angle.zero.

Value parameters

a

the Angle instance to be inverted

Attributes

Returns

a new Angle instance representing the additive inverse of the input

def plus(x: Angle, y: Angle): Angle

Adds two Angle instances together and returns the resulting Angle after normalization.

Adds two Angle instances together and returns the resulting Angle after normalization.

This method combines the components of two Angle objects using their plus operation and ensures that the resulting Angle is in a normalized form to comply with the characteristics of the Angle algebraic structure.

Value parameters

x

the first Angle instance to be added

y

the second Angle instance to be added

Attributes

Returns

a new Angle instance representing the sum of the two input angles, normalized

def zero: Angle

Provides the identity element for the Angle group, representing an angle of zero radians.

Provides the identity element for the Angle group, representing an angle of zero radians.

Attributes

Returns

an Angle instance with zero radians, acting as the identity element in the group structure.

Inherited methods

override def additive: CommutativeGroup[Angle]

Attributes

Definition Classes
AdditiveCommutativeGroup -> AdditiveCommutativeMonoid -> AdditiveCommutativeSemigroup -> AdditiveGroup -> AdditiveMonoid -> AdditiveSemigroup
Inherited from:
AdditiveCommutativeGroup
def isZero(a: Angle)(implicit ev: Eq[Angle]): Boolean

Tests if a is zero.

Tests if a is zero.

Attributes

Inherited from:
AdditiveMonoid
def minus(x: Angle, y: Angle): Angle

Attributes

Inherited from:
AdditiveGroup
def sum(as: IterableOnce[Angle]): Angle

Given a sequence of as, compute the sum.

Given a sequence of as, compute the sum.

Attributes

Inherited from:
AdditiveMonoid
override def sumN(a: Angle, n: Int): Angle

Attributes

Definition Classes
AdditiveGroup -> AdditiveMonoid -> AdditiveSemigroup
Inherited from:
AdditiveGroup
override def trySum(as: IterableOnce[Angle]): Option[Angle]

Given a sequence of as, combine them and return the total.

Given a sequence of as, combine them and return the total.

If the sequence is empty, returns None. Otherwise, returns Some(total).

Attributes

Definition Classes
AdditiveMonoid -> AdditiveSemigroup
Inherited from:
AdditiveMonoid