-
Notifications
You must be signed in to change notification settings - Fork 5
CompaJ Math
Danila Rassokhin edited this page Mar 23, 2023
·
1 revision
CompaJ uses Apache Commons Math library for math operations.
CompaJ has some global math constants, which can be used everywhere in your code:
-
$pi
represents PI number -
$i
represents imaginary unit -
$e
represents exponent
CompaJ extends standard Math
functions with List and Range compatible versions
//Use ranges
t = (0..10)
sin(t) //[0, ...]
cos(t) //[1, ...]
// Use lists
sin([0, 1, 2]) //[0, ...]
// Use var args
cost(0, 1, 2) //[1, ...]