@@ -28,7 +28,7 @@ import { Collection } from '@stdlib/types/array';
2828* @param x - value at which to evaluate a polynomial
2929* @returns evaluated polynomial
3030*/
31- type EvaluationFunction = ( x : number ) => number ;
31+ type PolynomialFunction = ( x : number ) => number ;
3232
3333/**
3434* Interface for evaluating polynomials.
@@ -49,7 +49,7 @@ interface EvalPoly {
4949 * @returns evaluated polynomial
5050 *
5151 * @example
52- * var v = evalpoly( [3.0,2.0,1.0], 10.0 ); // 3*10^0 + 2*10^1 + 1*10^2
52+ * var v = evalpoly( [ 3.0, 2.0, 1.0 ], 10.0 ); // 3*10^0 + 2*10^1 + 1*10^2
5353 * // returns 123.0
5454 */
5555 ( c : Collection < number > , x : number ) : number ;
@@ -68,15 +68,15 @@ interface EvalPoly {
6868 * @returns function for evaluating a polynomial
6969 *
7070 * @example
71- * var polyval = evalpoly.factory( [3.0,2.0,1.0] );
71+ * var polyval = evalpoly.factory( [ 3.0, 2.0, 1.0 ] );
7272 *
7373 * var v = polyval( 10.0 ); // => 3*10^0 + 2*10^1 + 1*10^2
7474 * // returns 123.0
7575 *
7676 * v = polyval( 5.0 ); // => 3*5^0 + 2*5^1 + 1*5^2
7777 * // returns 38.0
7878 */
79- factory ( c : Collection < number > ) : EvaluationFunction ;
79+ factory ( c : Collection < number > ) : PolynomialFunction ;
8080}
8181
8282/**
@@ -94,11 +94,11 @@ interface EvalPoly {
9494* @returns evaluated polynomial
9595*
9696* @example
97- * var v = evalpoly( [3.0,2.0,1.0], 10.0 ); // 3*10^0 + 2*10^1 + 1*10^2
97+ * var v = evalpoly( [ 3.0, 2.0, 1.0 ], 10.0 ); // 3*10^0 + 2*10^1 + 1*10^2
9898* // returns 123.0
9999*
100100* @example
101- * var polyval = evalpoly.factory( [3.0,2.0,1.0] );
101+ * var polyval = evalpoly.factory( [ 3.0, 2.0, 1.0 ] );
102102*
103103* var v = polyval( 10.0 ); // => 3*10^0 + 2*10^1 + 1*10^2
104104* // returns 123.0
0 commit comments