diff options
Diffstat (limited to 'Build/source/utils/asymptote/runpair.in')
-rw-r--r-- | Build/source/utils/asymptote/runpair.in | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Build/source/utils/asymptote/runpair.in b/Build/source/utils/asymptote/runpair.in index d6604454f5e..6170cd82feb 100644 --- a/Build/source/utils/asymptote/runpair.in +++ b/Build/source/utils/asymptote/runpair.in @@ -120,7 +120,7 @@ real Degrees(real radians) real Sin(real deg) { - int n=deg/90.0; + int n=(int) (deg/90.0); if(deg == n*90.0) { int m=n % 4; if(m < 0) m += 4; @@ -133,7 +133,7 @@ real Sin(real deg) real Cos(real deg) { - int n=deg/90.0; + int n=(int) (deg/90.0); if(deg == n*90.0) { int m=n % 4; if(m < 0) m += 4; @@ -146,7 +146,7 @@ real Cos(real deg) real Tan(real deg) { - int n=deg/90.0; + int n=(int) (deg/90.0); if(deg == n*90.0) { int m=n % 4; if(m < 0) m += 4; @@ -234,6 +234,12 @@ real dot(explicit pair z, explicit pair w) return dot(z,w); } +// Return the 2D scalar cross product z.x*w.y-z.y*w.x. +real cross(explicit pair z, explicit pair w) +{ + return cross(z,w); +} + pair bezier(pair a, pair b, pair c, pair d, real t) { real onemt=1-t; |