Tween::setEasing()
Description
Sets the easing shape function to the tween. The shape function that this is set to will affect the number returned by position(), which is a function of time(). For included shaping functions, see Shaper. For more information on the easeMode, see setEasingMode()
Example
import megamu.shapetween.*;

Tween ani;
Shaper cosine;
void setup(){
  ani = new Tween(this, 2);
  cosine = new CosineShaper( Tween.IN );
}

void draw(){
  background(255);
  
  if( playCount()%2 == 0 ) // if the play count is even
  	ani.setEasing( cosine );
  else
  	ani.setEasing( "myCustomEasing" );
  
  ellipse(ani.time()*width, ani.position()*height, 4, 4);
}

void myCustomEasing(float in){
	return 1 - (1-in)*(1-in);
}
Syntax
setEasing(shape)
setEasing(shape, easeMode)
Parameters
shape
Shaper function used for animation easing
easeMode
Optionally sets the ease direction for this shape,
Tween.IN, Tween.OUT, Tween.IN_OUT, Tween.OUT_IN
Flexibility
The shape parameter can actually be a number of different types, each of which imply a different means of setting the shape easing function.

Class
Creates an instance of this class to use as Shaper. The Shaper constants.
ani.setEasing( Tween.COSINE )
Shaper
Uses this instance of a Shaper.
ani.setEasing( new CosineShaper() )
String
Uses this method found in the processing applet. The method should have one float parameter which will be a number between 0 and 1
ani.setEasing( "customEasing" );

void customEasing( float in ){
	return 1 - (1-in)*(1-in);
}
Related
setEasingMode()
noEasing()
Shaper
time()
position()
playMode()