From 98c1c1890e91962876e53c026f5f3c502562d8b0 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Sun, 25 Jun 2006 23:59:12 +0200 Subject: correct height width ratio --- src/Stitch.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Stitch.cxx') diff --git a/src/Stitch.cxx b/src/Stitch.cxx index ae3158d..6bd29d2 100644 --- a/src/Stitch.cxx +++ b/src/Stitch.cxx @@ -28,6 +28,8 @@ #include "Stitch.H" +static double pi_d = asin(1.0) * 2.0; + Stitch::Stitch() { for (int i=0; iw(); char r, g, b; int y_off = img->h() / 2; + double radius = (double) img->w() / (view_end -view_start); for (int y=0; yh(); y++) { - double a_nick = atan(((double)(y_off - y)/(double)img->h())); + double a_nick = atan((double)(y_off - y)/radius); for (int x=0; xw(); x++) { double a_view; -- cgit v1.2.3