Behold, Nenya, Ring of Water and repository for our media and animation related
goodies, both Java 2D and LWJGL/JME 3D. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@1 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// $Id: LinearTimeFunction.java 4191 2006-06-13 22:42:20Z ray $
|
||||
|
||||
package com.threerings.media.util;
|
||||
|
||||
/**
|
||||
* Varies a value linearly with time.
|
||||
*/
|
||||
public class LinearTimeFunction extends TimeFunction
|
||||
{
|
||||
public LinearTimeFunction (int start, int end, int duration)
|
||||
{
|
||||
super(start, end, duration);
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
protected int computeValue (int dt)
|
||||
{
|
||||
int dv = (_end - _start);
|
||||
return (dt * dv / _duration) + _start;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user