From 7edfc757be29bd29111b898dfc87fb1b258920a3 Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Thu, 24 May 2012 12:36:48 +0100 Subject: Fix RegularPolyShape rotation to match TikZ In PGF/TikZ, regular polygons with rotation 0 have a side flat at the bottom. RegularPolyShape now does the same, and also takes its rotation in degrees. --- tikzit/src/common/util.m | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tikzit/src/common/util.m') diff --git a/tikzit/src/common/util.m b/tikzit/src/common/util.m index ad04a96..762516f 100644 --- a/tikzit/src/common/util.m +++ b/tikzit/src/common/util.m @@ -310,6 +310,10 @@ float radiansToDegrees (float radians) { return (radians * 180.0f) / M_PI; } +float degreesToRadians(float degrees) { + return (degrees * M_PI) / 180.0f; +} + int normaliseAngleDeg (int degrees) { while (degrees > 180) { degrees -= 360; -- cgit v1.2.3