diff options
Diffstat (limited to 'Build/source/utils/asymptote/glrender.cc')
-rw-r--r-- | Build/source/utils/asymptote/glrender.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Build/source/utils/asymptote/glrender.cc b/Build/source/utils/asymptote/glrender.cc index 41c2f66c0c9..ce7554e39f5 100644 --- a/Build/source/utils/asymptote/glrender.cc +++ b/Build/source/utils/asymptote/glrender.cc @@ -98,8 +98,9 @@ double Xfactor,Yfactor; int minimumsize=50; // Minimum initial rendering window width and height -const double degrees=180.0/M_PI; -const double radians=1.0/degrees; +static const double pi=acos(-1); +static const double degrees=180.0/pi; +static const double radians=1.0/degrees; double Background[4]; size_t Nlights; @@ -217,7 +218,7 @@ void setDimensions(int Width, int Height, double X, double Y) double Aspect=((double) Width)/Height; double xshift=X/Width*lastzoom+Shift.getx()*Xfactor; double yshift=Y/Height*lastzoom+Shift.gety()*Yfactor; - double Zoominv=1.0/Zoom; + double Zoominv=1.0/lastzoom; if(orthographic) { double xsize=Xmax-Xmin; double ysize=Ymax-Ymin; |