From 8124d5714aae4eb4ab4ab142d22c1b55e51e88a4 Mon Sep 17 00:00:00 2001 From: ClemensFischer Date: Wed, 21 Jan 2026 22:27:44 +0100 Subject: [PATCH] Updated Matrix.Rotate --- MapControl/Shared/Matrix.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MapControl/Shared/Matrix.cs b/MapControl/Shared/Matrix.cs index aa5b4355..c3ffeacf 100644 --- a/MapControl/Shared/Matrix.cs +++ b/MapControl/Shared/Matrix.cs @@ -65,10 +65,12 @@ namespace MapControl public void Rotate(double angle) { + angle = angle % 360d * Math.PI / 180d; + if (angle != 0d) { - var cos = Math.Cos(angle * Math.PI / 180d); - var sin = Math.Sin(angle * Math.PI / 180d); + var cos = Math.Cos(angle); + var sin = Math.Sin(angle); // equivalent to Multiply(new Matrix(cos, sin, -sin, cos, 0d, 0d)); //