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.

drh 2020-09-20 22:44 trunk
Commit cab87e342005b3a5629a4c7dcafe8a9676d4284bf9f8a9910daf58b0bfdb9c35
1 file changed +1 -3
+1 -3
--- src/pikchr.c
+++ src/pikchr.c
@@ -6161,12 +6161,10 @@
61616161
61626162
/* Do a linear interpolation of two positions.
61636163
*/
61646164
static PPoint pik_position_between(PNum x, PPoint p1, PPoint p2){
61656165
PPoint out;
6166
- if( x<0.0 ) x = 0.0;
6167
- if( x>1.0 ) x = 1.0;
61686166
out.x = p2.x*x + p1.x*(1.0 - x);
61696167
out.y = p2.y*x + p1.y*(1.0 - x);
61706168
return out;
61716169
}
61726170
@@ -7285,6 +7283,6 @@
72857283
}
72867284
return 0;
72877285
}
72887286
#endif /* PIKCHR_SHELL */
72897287
7290
-#line 7315 "pikchr.c"
7288
+#line 7313 "pikchr.c"
72917289
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button