Equation

data class Equation(val coefficients: List<Double> = listOf())

An equation of the form ax^0 + bx^1 ... mx^n. Each coefficient corresponds with x to the index of that coefficient, i.e. the coefficient at index 2 would be associated with x^2.

Constructors

Link copied to clipboard
constructor(vararg coefficients: Double)
constructor(coefficients: List<Double> = listOf())

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun calculate(value: Double): Double