Revision a36b0cbb
Added by Leszek Koltunski about 8 years ago
src/main/java/org/distorted/library/type/Dynamic.java | ||
---|---|---|
482 | 482 |
|
483 | 483 |
protected void computeOrthonormalBase() |
484 | 484 |
{ |
485 |
int non_zeros=0; |
|
486 | 485 |
int last_non_zero=-1; |
487 | 486 |
float tmp; |
488 | 487 |
|
489 | 488 |
for(int i=0; i<mDimension; i++) |
490 | 489 |
if( baseV[0][i] != 0.0f ) |
491 |
{ |
|
492 |
non_zeros++; |
|
493 | 490 |
last_non_zero=i; |
494 |
} |
|
495 | 491 |
/* |
496 | 492 |
if( last_non_zero != lastNon ) |
497 | 493 |
android.util.Log.e("dynamic", "lastNon="+lastNon+" last_non_zero="+last_non_zero); |
498 | 494 |
*/ |
499 | 495 |
|
500 |
if( non_zeros==0 ) ///
|
|
496 |
if( last_non_zero==-1 ) ///
|
|
501 | 497 |
{ // velocity is the 0 vector -> two |
502 | 498 |
for(int i=0; i<mDimension-1; i++) // consecutive points we are interpolating |
503 | 499 |
for(int j=0; j<mDimension; j++) // through are identical -> no noise, |
Also available in: Unified diff
Next fixes for issues with 'jumping' path when noise is on. (and a whole lot of commented out debugging)