summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/algebra3.cc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-06-08 13:46:05 +0000
committerKarl Berry <karl@freefriends.org>2010-06-08 13:46:05 +0000
commita960e44eb527236f39aec81babc0474911a86078 (patch)
tree9950eca71791d90820a80a521a7cc252c0955db5 /Build/source/utils/asymptote/algebra3.cc
parent6443467452320c296faa1f43f0606a9457bd4463 (diff)
asy 1.96
git-svn-id: svn://tug.org/texlive/trunk@18817 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/algebra3.cc')
-rw-r--r--Build/source/utils/asymptote/algebra3.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/Build/source/utils/asymptote/algebra3.cc b/Build/source/utils/asymptote/algebra3.cc
index 7dafd2d5839..203b430c2ed 100644
--- a/Build/source/utils/asymptote/algebra3.cc
+++ b/Build/source/utils/asymptote/algebra3.cc
@@ -75,6 +75,8 @@
#include "algebra3.h"
#include <cmath>
+static const double radians=acos(-1)/180.0;
+
#ifdef VEC_ERROR_FATAL
#ifndef VEC_ERROR
#define VEC_ERROR(E) { printf( "VERROR %s\n", E ); exit(1); }
@@ -1502,7 +1504,7 @@ mat3 translation2D(const vec2 &v)
mat3 rotation2D(const vec2 &Center, float angleDeg)
{
- float angleRad = (float) (angleDeg * M_PI / 180.0);
+ float angleRad = (float) (angleDeg * radians);
float c = (float) cos(angleRad);
float s = (float) sin(angleRad);
@@ -1540,7 +1542,7 @@ mat4 translation3D(const vec3 &v)
mat4 rotation3D(const vec3 &Axis, float angleDeg)
{
- float angleRad = (float) (angleDeg * M_PI / 180.0);
+ float angleRad = (float) (angleDeg * radians);
float c = (float) cos(angleRad);
float s = (float) sin(angleRad);
float t = 1.0f - c;