@@ -28,7 +28,7 @@ import { Collection } from '@stdlib/types/array';
28
28
* @param x - value at which to evaluate a polynomial
29
29
* @returns evaluated polynomial
30
30
*/
31
- type EvaluationFunction = ( x : number ) => number ;
31
+ type PolynomialFunction = ( x : number ) => number ;
32
32
33
33
/**
34
34
* Interface for evaluating polynomials.
@@ -49,7 +49,7 @@ interface EvalPoly {
49
49
* @returns evaluated polynomial
50
50
*
51
51
* @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
53
53
* // returns 123.0
54
54
*/
55
55
( c : Collection < number > , x : number ) : number ;
@@ -68,15 +68,15 @@ interface EvalPoly {
68
68
* @returns function for evaluating a polynomial
69
69
*
70
70
* @example
71
- * var polyval = evalpoly.factory( [3.0,2.0,1.0] );
71
+ * var polyval = evalpoly.factory( [ 3.0, 2.0, 1.0 ] );
72
72
*
73
73
* var v = polyval( 10.0 ); // => 3*10^0 + 2*10^1 + 1*10^2
74
74
* // returns 123.0
75
75
*
76
76
* v = polyval( 5.0 ); // => 3*5^0 + 2*5^1 + 1*5^2
77
77
* // returns 38.0
78
78
*/
79
- factory ( c : Collection < number > ) : EvaluationFunction ;
79
+ factory ( c : Collection < number > ) : PolynomialFunction ;
80
80
}
81
81
82
82
/**
@@ -94,11 +94,11 @@ interface EvalPoly {
94
94
* @returns evaluated polynomial
95
95
*
96
96
* @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
98
98
* // returns 123.0
99
99
*
100
100
* @example
101
- * var polyval = evalpoly.factory( [3.0,2.0,1.0] );
101
+ * var polyval = evalpoly.factory( [ 3.0, 2.0, 1.0 ] );
102
102
*
103
103
* var v = polyval( 10.0 ); // => 3*10^0 + 2*10^1 + 1*10^2
104
104
* // returns 123.0
0 commit comments