libanim
diff src/track.c @ 43:a720e8d7023d
fixed a bug in the manual slerping in anm_get_node_rotation
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 01 Mar 2013 08:21:19 +0200 |
parents | 9cd8afd6fa6d |
children | 9691b3521fa3 |
line diff
1.1 --- a/src/track.c Wed Feb 27 21:38:33 2013 +0200 1.2 +++ b/src/track.c Fri Mar 01 08:21:19 2013 +0200 1.3 @@ -284,9 +284,13 @@ 1.4 1.5 static anm_time_t remap_repeat(anm_time_t tm, anm_time_t start, anm_time_t end) 1.6 { 1.7 - anm_time_t interv = end - start; 1.8 - anm_time_t x = (tm - start) % interv; 1.9 + anm_time_t x, interv = end - start; 1.10 1.11 + if(interv == 0) { 1.12 + return start; 1.13 + } 1.14 + 1.15 + x = (tm - start) % interv; 1.16 if(x < 0) { 1.17 x += interv; 1.18 }