package com.github.fwilhe.incell

fun isEven(x: Int): Double = if (x.rem(2) == 0) 1.0 else 0.0
fun count(x: Int): Double = x.toDouble()

fun sine(x: Int): Double = Math.sin(x.toDouble())
fun cosine(x: Int): Double = Math.cos(x.toDouble())
fun tangent(x: Int): Double = Math.tan(x.toDouble())
fun logarithm(x: Int): Double = Math.log(x.toDouble())
fun absolute(x: Int): Double = Math.abs(x.toDouble())
fun random(x: Int): Double = Math.random()
fun powerOfTwo(x: Int): Double = Math.pow(x.toDouble(), 2.0)

package com.github.fwilhe.incell

import kotlin.math.pow

fun isEven(x: Int): Double = if (x.rem(2) == 0) 1.0 else 0.0
fun count(x: Int): Double = x.toDouble()

fun sine(x: Int): Double = kotlin.math.sin(x.toDouble())
fun cosine(x: Int): Double = kotlin.math.cos(x.toDouble())
fun tangent(x: Int): Double = kotlin.math.tan(x.toDouble())
fun logarithm(x: Int): Double = kotlin.math.ln(x.toDouble())
fun absolute(x: Int): Double = kotlin.math.abs(x.toDouble())
fun powerOfTwo(x: Int): Double = x.toDouble().pow(2)

Use Kotlin math functions for use on JVM and JS
Use Kotlin math functions for use on JVM and JS

fwilhe/Incell,sputnik27/Incell,fwilhe/Incell