Dev #127

Merged
altavir merged 214 commits from dev into master 2020-08-11 08:33:21 +03:00
2 changed files with 5 additions and 1 deletions
Showing only changes of commit a275e74cf2 - Show all commits

View File

@ -17,6 +17,10 @@ interface ExtendedFieldOperations<T> :
override fun unaryOperation(operation: String, arg: T): T = when (operation) {
TrigonometricOperations.COS_OPERATION -> cos(arg)
TrigonometricOperations.SIN_OPERATION -> sin(arg)
TrigonometricOperations.TAN_OPERATION -> tan(arg)
InverseTrigonometricOperations.ACOS_OPERATION -> acos(arg)
InverseTrigonometricOperations.ASIN_OPERATION -> asin(arg)
InverseTrigonometricOperations.ATAN_OPERATION -> atan(arg)
PowerOperations.SQRT_OPERATION -> sqrt(arg)
ExponentialOperations.EXP_OPERATION -> exp(arg)
ExponentialOperations.LN_OPERATION -> ln(arg)

View File

@ -13,7 +13,7 @@ package scientifik.kmath.operations
interface TrigonometricOperations<T> : FieldOperations<T> {
fun sin(arg: T): T
fun cos(arg: T): T
fun tan(arg: T): T = sin(arg) / cos(arg)
fun tan(arg: T): T
companion object {
const val SIN_OPERATION = "sin"