Package com.moseph.modelutils.curve

Source Code of com.moseph.modelutils.curve.LinearFunctionTest

package com.moseph.modelutils.curve;

import static org.junit.Assert.*;

import org.junit.Test;

import com.moseph.modelutils.serialisation.EasyPersister;

public class LinearFunctionTest
{
 
  @Test
  public void testBasicOperation() throws Exception
  {
    LinearFunction function = new LinearFunction( 3, 8 );
    function = new EasyPersister().roundTripSerialise( function );
    assertEquals( 3 + 4*8, function.sample4 ), 0.00001 );
    assertEquals( 3 , function.sample0 ), 0.00001 );
    assertEquals( 3 - 4*8, function.sample-4 ), 0.00001 );
  }

}
TOP

Related Classes of com.moseph.modelutils.curve.LinearFunctionTest

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.