"Carlos \"Guâno\" Grohmann" wrote:
> from the man page:
> atan(x,y) inverse tangent of y/x (result is in degrees)
>
> is this correct? is it y/x or x/y?
The documentation is correct. When r.mapcalc's atan() function is
passed two arguments, it calls the ANSI C atan2() function with the
arguments swapped, then converts the result from -PI..PI radians to
0..360 degrees:
res[i] = RADIANS_TO_DEGREES * atan2(arg2[i], arg1[i]);
if (res[i] < 0)
res[i] += 360.0;
The different argument order may be confusing, but changing it would
break existing scripts.
--
Glynn Clements <[EMAIL PROTECTED]>
_______________________________________________
grassuser mailing list
[email protected]
http://grass.itc.it/mailman/listinfo/grassuser