Versions of the trigonometric functions sine, cosine, and tangent, require that the arguments are Angles.


Examples of the functions

Imports and implicits

import edu.uci.ics.jung.graph.DirectedSparseGraph

import cats.implicits._

import spire.implicits.DoubleAlgebra
import spire.algebra.Module
import spire.math.Rational

import axle.math._
import axle.quanta.Angle
import axle.quanta.UnittedQuantity
import axle.quanta.UnitOfMeasurement
import axle.algebra.modules.doubleRationalModule
import axle.jung.directedGraphJung

implicit val angleConverter = Angle.converterGraphK2[Double, DirectedSparseGraph]

import angleConverter.radian


cosine(10d *: degree)
// res5: Double = 0.984807753012208

sine(3d *: radian)
// res6: Double = 0.1411200080598672

tangent(40d *: degree)
// res7: Double = 0.8390996311772799