Back to project page block-composer.
The source code is released under:
MIT License
If you think the Android project block-composer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package bwr.blockcomposer.types; //from w w w.j av a2s. c o m public class RotatingFloat { private final float duration, rate; private float value = 0; private long time = 0; public RotatingFloat(float change, long duration) { this.duration = duration; this.rate = change/duration; } public void update(long dt) { time += dt; while(time > duration) { time -= duration; } value = time * rate; } public float getValue() { return value; } }