/[gzz]/gzz/gfx/libfisheye/Fisheye.hxx
ViewVC logotype

Diff of /gzz/gfx/libfisheye/Fisheye.hxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by tjl, Wed Sep 25 15:34:55 2002 UTC revision 1.3 by tjl, Mon Sep 30 08:15:42 2002 UTC
# Line 27  namespace Fisheye { Line 27  namespace Fisheye {
27    
28      //For given z, the magnification range is [ 1, 1 + z ]      //For given z, the magnification range is [ 1, 1 + z ]
29      struct scalar_mag_atan {      struct scalar_mag_atan {
30          scalar_mag_atan() : mag(1) { }          scalar_mag_atan() : z(1) { }
31          scalar_mag_atan(float mag) : mag(mag) { }          scalar_mag_atan(float mag) : z(mag-1) { }
32          float mag;          float z;
33          float operator()(float r2) const {          float operator()(float r2) const {
34              if (r2 > 0) {              if (r2 > 0) {
35                  float r = sqrt(r2);                  float r = sqrt(r2);
36                  return 1 + mag * atan(r) / r;                  return 1 + z * atan(r) / r;
37              }              }
38              return 1;              return 1;
39          }          }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26