UNPKG

@stdlib/esm

Version:

ES module distribution for Stdlib, a standard library for JavaScript and Node.js.

3 lines 902 B
// This file is a part of stdlib. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 import e from"./../base/special/pow.js";import r from"./../../assert/is-number.js";import i from"./../../assert/is-nonnegative-integer.js";import t from"./../base/assert/is-nan.js";var n=e,a=r.isPrimitive,o=i.isPrimitive,s=t;function m(e,r,i){var t,m,u,f,p;if(!a(e)||s(e))throw new TypeError("invalid argument. Exponent of start value must be numeric. Value: `"+e+"`.");if(!a(r)||s(r))throw new TypeError("invalid argument. Exponent of stop value must be numeric. Value: `"+r+"`.");if(arguments.length<3)i=10;else{if(!o(i))throw new TypeError("invalid argument. Length must be a nonnegative integer. Value: `"+i+"`.");if(0===i)return[]}for(f=(r-e)/(m=i-1),u=e,(t=new Array(i))[0]=n(10,u),p=1;p<m;p++)u+=f,t[p]=n(10,u);return t[m]=n(10,r),t}var u=m;export default u; //# sourceMappingURL=logspace.js.map