This project is a partial port to Kotlin of the features available in the Euler created by Mattt. The features that were not ported are already defined by the Kotlin standard library.
Euler Kotlin is library that implements most of the standard mathematical operation not already provided by the Kotlin standard library.
While Kotlin does not support custom operators, it does, however, provide two very powerful mechanisms that this library relies on: the ability to extend non-nominal types (e.g. typealiases) and the support of infix functions.
infix fun Int.divides(other: Int): Boolean
- Dividesinfix fun Int.doesNotDevide(other: Int): Boolean
- Does Not Divide
val RealFunction.derivative: RealFunction
- Derivative (1st, 2nd, 3rd, and Nth Order)infix fun RealFunction.integratedOver(range: IntegrationRange): Double
- Integral (Definite & Indefinite)
infix fun <T> Function<T>.composeWith(other: Function<T>): Function<T>
- Composition
infix fun Array<Number>.dotProduct(other: Array<Number>): Number
- Dot Productinfix fun Vector3D.crossProduct(other: Vector3D): Vector3D
- Cross Productval Array<Number>.norm: Number
- Vector Norminfix fun Array<Number>.angleWith(other: Array<Number>): Number
- Angle Between Vectors
MIT
Vincent Pradeilles (@v_pradeilles)