Skip to content

Commit

Permalink
Optimize divisions
Browse files Browse the repository at this point in the history
  • Loading branch information
kurgm committed Jan 21, 2024
1 parent 839a7f1 commit ca7834e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions slim/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export const setValues: (map: FontSetting) => {
const { vx, vy } = this;
const d = Math.hypot(fontsetting.weight_x * vy, fontsetting.weight_y * vx) / (2.0 * vy);
return [
signedY / (2.0 * vy / vx),
signedY * vx / (2.0 * vy),
signedY / 2.0,
d,
0
Expand All @@ -252,7 +252,7 @@ export const setValues: (map: FontSetting) => {
const d = Math.hypot(fontsetting.weight_x * vy, fontsetting.weight_y * vx) / (2.0 * vx);
return [
signedX / 2.0,
signedX * vy / vx / 2.0,
signedX * vy / (2.0 * vx),
0,
-d
];
Expand Down

0 comments on commit ca7834e

Please sign in to comment.