Package ca.nengo.math.impl

Examples of ca.nengo.math.impl.SineFunction.map()


  /*
   * Test method for 'ca.nengo.math.impl.SineFunction.map(float[])'
   */
  public void testMap() {
    SineFunction f = new SineFunction(0.5f);
    TestUtil.assertClose(0f, f.map(new float[]{0f}), .00001f);
    TestUtil.assertClose(1f, f.map(new float[]{(float)Math.PI}), .00001f);
    TestUtil.assertClose(0.84147f, f.map(new float[]{2f}), .00001f);
  }

  /*
 
View Full Code Here


   * Test method for 'ca.nengo.math.impl.SineFunction.map(float[])'
   */
  public void testMap() {
    SineFunction f = new SineFunction(0.5f);
    TestUtil.assertClose(0f, f.map(new float[]{0f}), .00001f);
    TestUtil.assertClose(1f, f.map(new float[]{(float)Math.PI}), .00001f);
    TestUtil.assertClose(0.84147f, f.map(new float[]{2f}), .00001f);
  }

  /*
   * Test method for 'ca.nengo.math.impl.SineFunction.multiMap(float[][])'
View Full Code Here

   */
  public void testMap() {
    SineFunction f = new SineFunction(0.5f);
    TestUtil.assertClose(0f, f.map(new float[]{0f}), .00001f);
    TestUtil.assertClose(1f, f.map(new float[]{(float)Math.PI}), .00001f);
    TestUtil.assertClose(0.84147f, f.map(new float[]{2f}), .00001f);
  }

  /*
   * Test method for 'ca.nengo.math.impl.SineFunction.multiMap(float[][])'
   */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.