Fossil SCM
Update pikchr.c to allow "<i>fraction</i> of the way between" position forms to have a fraction less than 0.0 or greater than 1.0.
Commit
cab87e342005b3a5629a4c7dcafe8a9676d4284bf9f8a9910daf58b0bfdb9c35
Parent
249817138c37596…
1 file changed
+1
-3
+1
-3
| --- src/pikchr.c | ||
| +++ src/pikchr.c | ||
| @@ -6161,12 +6161,10 @@ | ||
| 6161 | 6161 | |
| 6162 | 6162 | /* Do a linear interpolation of two positions. |
| 6163 | 6163 | */ |
| 6164 | 6164 | static PPoint pik_position_between(PNum x, PPoint p1, PPoint p2){ |
| 6165 | 6165 | PPoint out; |
| 6166 | - if( x<0.0 ) x = 0.0; | |
| 6167 | - if( x>1.0 ) x = 1.0; | |
| 6168 | 6166 | out.x = p2.x*x + p1.x*(1.0 - x); |
| 6169 | 6167 | out.y = p2.y*x + p1.y*(1.0 - x); |
| 6170 | 6168 | return out; |
| 6171 | 6169 | } |
| 6172 | 6170 | |
| @@ -7285,6 +7283,6 @@ | ||
| 7285 | 7283 | } |
| 7286 | 7284 | return 0; |
| 7287 | 7285 | } |
| 7288 | 7286 | #endif /* PIKCHR_SHELL */ |
| 7289 | 7287 | |
| 7290 | -#line 7315 "pikchr.c" | |
| 7288 | +#line 7313 "pikchr.c" | |
| 7291 | 7289 |
| --- src/pikchr.c | |
| +++ src/pikchr.c | |
| @@ -6161,12 +6161,10 @@ | |
| 6161 | |
| 6162 | /* Do a linear interpolation of two positions. |
| 6163 | */ |
| 6164 | static PPoint pik_position_between(PNum x, PPoint p1, PPoint p2){ |
| 6165 | PPoint out; |
| 6166 | if( x<0.0 ) x = 0.0; |
| 6167 | if( x>1.0 ) x = 1.0; |
| 6168 | out.x = p2.x*x + p1.x*(1.0 - x); |
| 6169 | out.y = p2.y*x + p1.y*(1.0 - x); |
| 6170 | return out; |
| 6171 | } |
| 6172 | |
| @@ -7285,6 +7283,6 @@ | |
| 7285 | } |
| 7286 | return 0; |
| 7287 | } |
| 7288 | #endif /* PIKCHR_SHELL */ |
| 7289 | |
| 7290 | #line 7315 "pikchr.c" |
| 7291 |
| --- src/pikchr.c | |
| +++ src/pikchr.c | |
| @@ -6161,12 +6161,10 @@ | |
| 6161 | |
| 6162 | /* Do a linear interpolation of two positions. |
| 6163 | */ |
| 6164 | static PPoint pik_position_between(PNum x, PPoint p1, PPoint p2){ |
| 6165 | PPoint out; |
| 6166 | out.x = p2.x*x + p1.x*(1.0 - x); |
| 6167 | out.y = p2.y*x + p1.y*(1.0 - x); |
| 6168 | return out; |
| 6169 | } |
| 6170 | |
| @@ -7285,6 +7283,6 @@ | |
| 7283 | } |
| 7284 | return 0; |
| 7285 | } |
| 7286 | #endif /* PIKCHR_SHELL */ |
| 7287 | |
| 7288 | #line 7313 "pikchr.c" |
| 7289 |