Introduction
Introduction Statistics Contact Development Disclaimer Help
tadd missing line delimiters, elaborate on integration scheme - slidergrid - gr…
git clone git://src.adamsgaard.dk/slidergrid
Log
Files
Refs
README
LICENSE
---
commit fd19f30421f1a2866fbe554a73b8eff43f786ec5
parent e99f679f8b69de849021d65feb2ac5a955d270ba
Author: Anders Damsgaard <[email protected]>
Date: Tue, 15 Mar 2016 14:09:34 -0700
add missing line delimiters, elaborate on integration scheme
Diffstat:
M slider.c | 4 +++-
M vector_math.h | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/slider.c b/slider.c
t@@ -8,7 +8,9 @@ void print_slider_position(slider s)
printf("%f\t%f\t%f\n", s.pos.x, s.pos.y, s.pos.z);
}
-/* Explicit temporal integration scheme based on three-term Taylor expansion */
+/* Explicit temporal integration scheme based on three-term Taylor expansion.
+ * Truncation error O(dt^4) for positions, O(dt^3) for velocities. Accelerati…
+ * change is approximated by backwards differences. */
void integrate_kinematics(slider s, Float dt, int iteration)
{
s.acc = divide_float3_scalar(s.force, s.mass);
diff --git a/vector_math.h b/vector_math.h
t@@ -14,5 +14,5 @@ Float3 divide_float3(Float3 v1, Float3 v2);
Float3 multiply_float3_scalar(Float3 v, Float s);
Float3 divide_float3_scalar(Float3 v, Float s);
Float3 divide_scalar_float3(Float s, Float3 v);
-Float3 add_float3_scalar(Float3 v, Float s)
-Float3 add_scalar_float3(Float s, Float3 v)
+Float3 add_float3_scalar(Float3 v, Float s);
+Float3 add_scalar_float3(Float s, Float3 v);
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.