Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "simulate/iter/sawtooth-wave/docs/types/index.d"

Index

Interfaces

Type aliases

Functions

Type aliases

Iterator

Iterator: Iter | IterableIterator

Functions

Export assignment iterSawtoothWave

  • Returns an iterator which generates a sawtooth wave.

    Notes

    • If an environment supports Symbol.iterator, the returned iterator is iterable.
    throws

    period option must be a positive integer

    throws

    amplitude must be a nonnegative number

    throws

    offset option must be an integer

    throws

    iter option must be a nonnegative integer

    Parameters

    • Optional options: Options

      function options

    Returns Iterator

    iterator

    Example

    var opts = {
        'period': 4
    };
    
    var iter = iterSawtoothWave( opts );
    
    var v = iter.next().value;
    // returns 0.0
    
    v = iter.next().value;
    // returns ~0.5
    
    v = iter.next().value;
    // returns ~1.0
    
    // ...