summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
192fdba)
git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@973
180e2498-e6e9-4542-8430-
84ac67f01cd8
* dt is the time step between each array value
*/
public static double trapz(double[] y, double dt){
* dt is the time step between each array value
*/
public static double trapz(double[] y, double dt){
- double stop = y.length * dt;
+ double stop = (y.length -1) * dt;
if (y.length <= 1 || dt <= 0) return 0;
if (y.length <= 1 || dt <= 0) return 0;