Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "math/iter/special/cospi/docs/types/index.d"

Index

Type aliases

Functions

Type aliases

Iterator

Iterator: Iter | IterableIterator

Functions

Export assignment iterCospi

  • Returns an iterator which computes the cosine of each iterated value times π.

    Notes

    • Computes cos(πx) more accurately than cos(pi*x), especially for large x.
    • If an environment supports Symbol.iterator and a provided iterator is iterable, the returned iterator is iterable.

    Parameters

    Returns Iterator

    iterator

    Example

    var randu = require( `@stdlib/random/iter/randu` );
    
    var iter = iterCospi( randu() );
    
    var r = iter.next().value;
    // returns <number>
    
    r = iter.next().value;
    // returns <number>
    
    r = iter.next().value;
    // returns <number>
    
    // ...