summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/angle.h
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-09-11 00:21:50 +0000
committerKarl Berry <karl@freefriends.org>2009-09-11 00:21:50 +0000
commitf06a2c99f2a8bbd8f641712c772179e8ed9ce14f (patch)
treefcf4f2b9d0492da04d9bf3761fbce51fb316024f /Build/source/utils/asymptote/angle.h
parentd4c54e52fe8e42b8ce9b160c70d897bb1d06eee7 (diff)
asymptote 1.86
git-svn-id: svn://tug.org/texlive/trunk@15218 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/angle.h')
-rw-r--r--Build/source/utils/asymptote/angle.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/angle.h b/Build/source/utils/asymptote/angle.h
index 0adaa4a3d31..81303466eb3 100644
--- a/Build/source/utils/asymptote/angle.h
+++ b/Build/source/utils/asymptote/angle.h
@@ -36,6 +36,13 @@ inline double angle(double x, double y)
return atan2(y,x);
}
+// Return an angle in the interval [0,360).
+inline double principalBranch(double deg)
+{
+ if(deg < 0) deg += 360;
+ return deg;
+}
+
} //namespace camp
#endif