All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.cesium.LinearApproximation.kt Maven / Gradle / Ivy

There is a newer version: 1.90.0-10
Show newest version
// Automatically generated - do not modify!

package cesium

/**
 * An [InterpolationAlgorithm] for performing linear interpolation.
 * @see Online Documentation
 */
@JsName("\$cesium__LinearApproximation")
external object LinearApproximation {
    /**
     * Given the desired degree, returns the number of data points required for interpolation.
     * Since linear interpolation can only generate a first degree polynomial, this function
     * always returns 2.
     * @param [degree] The desired degree of interpolation.
     * @return This function always returns 2.
     * @see Online Documentation
     */
    fun getRequiredDataPoints(degree: Double): Int

    /**
     * Interpolates values using linear approximation.
     * @param [x] The independent variable for which the dependent variables will be interpolated.
     * @param [xTable] The array of independent variables to use to interpolate.  The values
     *   in this array must be in increasing order and the same value must not occur twice in the array.
     * @param [yTable] The array of dependent variables to use to interpolate.  For a set of three
     *   dependent values (p,q,w) at time 1 and time 2 this should be as follows: {p1, q1, w1, p2, q2, w2}.
     * @param [yStride] The number of dependent variable values in yTable corresponding to
     *   each independent variable value in xTable.
     * @param [result] An existing array into which to store the result.
     * @return The array of interpolated values, or the result parameter if one was provided.
     * @see Online Documentation
     */
    fun interpolateOrderZero(
        x: Double,
        xTable: Array,
        yTable: Array,
        yStride: Double,
        result: Array? = definedExternally,
    ): Array
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy