Skip to content

Commit

Permalink
fix wind direction math. close leeoniya#970.
Browse files Browse the repository at this point in the history
  • Loading branch information
leeoniya committed Jul 8, 2024
1 parent e6fcc60 commit 3a448dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion demos/wind-direction.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
let yPx = u.valToPos(speeds[i], 'y2', true);

let len = 15;
let theta = dirs[i] * (Math.PI / 180);
let theta = (dirs[i] - 90) * (Math.PI / 180);
let dx = len * Math.cos(theta);
let dy = len * Math.sin(theta);

Expand Down

0 comments on commit 3a448dc

Please sign in to comment.