Remove invalid UTF-8 chars from source.

Double checked that the time corrected verlet
equation is still readable. (If it isn't there's
always wikipedia).

Change-Id: I6573a4a096c2f2089968c19c79465b37540c2197
This commit is contained in:
Narayan Kamath
2013-10-24 19:15:06 +01:00
parent 8edf8ef6aa
commit 94ade845a7

View File

@@ -165,7 +165,7 @@ public class AccelerometerPlayActivity extends Activity {
final float gy = -sy * m; final float gy = -sy * m;
/* /*
* <EFBFBD>F = mA <=> A = <EFBFBD>F / m We could simplify the code by * F = mA <=> A = F / m We could simplify the code by
* completely eliminating "m" (the mass) from all the equations, * completely eliminating "m" (the mass) from all the equations,
* but it would hide the concepts from this sample code. * but it would hide the concepts from this sample code.
*/ */
@@ -175,12 +175,12 @@ public class AccelerometerPlayActivity extends Activity {
/* /*
* Time-corrected Verlet integration The position Verlet * Time-corrected Verlet integration The position Verlet
* integrator is defined as x(t+<EFBFBD>t) = x(t) + x(t) - x(t-<EFBFBD>t) + * integrator is defined as x(t+dt) = x(t) + x(t) - x(t-dt) +
* a(t)<EFBFBD>t<EFBFBD>2 However, the above equation doesn't handle variable * a(t).t^2 However, the above equation doesn't handle variable
* <EFBFBD>t very well, a time-corrected version is needed: x(t+<EFBFBD>t) = * dt very well, a time-corrected version is needed: x(t+dt) =
* x(t) + (x(t) - x(t-<EFBFBD>t)) * (<EFBFBD>t/<EFBFBD>t_prev) + a(t)<EFBFBD>t<EFBFBD>2 We also add * x(t) + (x(t) - x(t-dt)) * (dt/dt_prev) + a(t).t^2 We also add
* a simple friction term (f) to the equation: x(t+<EFBFBD>t) = x(t) + * a simple friction term (f) to the equation: x(t+dt) = x(t) +
* (1-f) * (x(t) - x(t-<EFBFBD>t)) * (<EFBFBD>t/<EFBFBD>t_prev) + a(t)<EFBFBD>t<EFBFBD>2 * (1-f) * (x(t) - x(t-dt)) * (dt/dt_prev) + a(t)t^2
*/ */
final float dTdT = dT * dT; final float dTdT = dT * dT;
final float x = mPosX + mOneMinusFriction * dTC * (mPosX - mLastPosX) + mAccelX final float x = mPosX + mOneMinusFriction * dTC * (mPosX - mLastPosX) + mAccelX