From 3a448dc362215bc992123d03162a6df435c78072 Mon Sep 17 00:00:00 2001 From: Leon Sorokin Date: Mon, 8 Jul 2024 14:42:44 -0500 Subject: [PATCH] fix wind direction math. close #970. --- demos/wind-direction.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/wind-direction.html b/demos/wind-direction.html index 41dabb91..6d689d4c 100644 --- a/demos/wind-direction.html +++ b/demos/wind-direction.html @@ -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);