mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-19 22:11:04 +01:00
[gvar] Rewrite linear interpolation
This commit is contained in:
1 parent
57519b532d
commit
5be6e5dd57
1 file changed
+1
-1
@@ -536,7 +536,7 @@ struct gvar
|
||||
|
||||
/* linear interpolation */
|
||||
float r = (target_val - prev_val) / (next_val - prev_val);
|
||||
return (1.f - r) * prev_delta + r * next_delta;
|
||||
return prev_delta + r * (next_delta - prev_delta);
|
||||
}
|
||||
|
||||
static unsigned int next_index (unsigned int i, unsigned int start, unsigned int end)
|
||||
|
||||
Reference in new issue
Block a user