text: // This file is a part of stdlib. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
  import e from"./../../utils/define-nonenumerable-read-only-property.js";import i from"./../../symbol/iterator.js";import t from"./../../math/base/special/sinpi.js";import r from"./../../math/base/special/asin.js";import o from"./../../constants/math/float64-half-pi.js";import n from"./../../assert/is-plain-object.js";import p from"./../../assert/has-own-property.js";import s from"./../../assert/is-integer.js";import a from"./../../assert/is-positive-integer.js";import m from"./../../assert/is-nonnegative-integer.js";import f from"./../../assert/is-nonnegative-number.js";var u=n,d=p,l=s.isPrimitive,v=a.isPrimitive,g=m.isPrimitive,b=f.isPrimitive;function j(e,i){return u(i)?d(i,"period")&&(e.period=i.period,!v(i.period))?new TypeError("invalid option. `period` option must be an positive integer. Option: `"+i.period+"`."):d(i,"amplitude")&&(e.amplitude=i.amplitude,!b(i.amplitude))?new TypeError("invalid option. `amplitude` option must be a nonnegative number. Option: `"+i.amplitude+"`."):d(i,"offset")&&(e.offset=i.offset,!l(i.offset))?new TypeError("invalid option. `offset` option must be an integer. Option: `"+i.offset+"`."):d(i,"iter")&&(e.iter=i.iter,!g(i.iter))?new TypeError("invalid option. `iter` option must be a nonnegative integer. Option: `"+i.iter+"`."):null:new TypeError("invalid argument. Options argument must be an object. Value: `"+i+"`.")}var c=e,y=i,h=t,w=r,E=o,O=j;function T(e){var i,t,r,o,n,p,s,a;if(i={period:10,amplitude:1,offset:0,iter:1e308},arguments.length&&(o=O(i,e)))throw o;return(n=(i.period-i.offset)%i.period)<0&&(n+=i.period),n-=1,p=2/i.period,s=i.amplitude/E,a=0,c(t={},"next",m),c(t,"return",f),y&&c(t,y,u),t;function m(){return a+=1,r||a>i.iter?{done:!0}:(n+=1,n%=i.period,{value:s*w(h(p*n)),done:!1})}function f(e){return r=!0,arguments.length?{value:e,done:!0}:{done:!0}}function u(){return T(i)}}var P=T;export default P;
  //# sourceMappingURL=triangle-wave.js.map