**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2007 Chris Moore
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
int intersect(Real x,Real y) const
{
- if((y < aabb.miny) || (y > aabb.maxy) || (x < aabb.minx)) return 0;
+ if((y < aabb.miny+EPSILON) || (y > aabb.maxy) || (x < aabb.minx)) return 0;
if(x > aabb.maxx) return ydir;
//int i = 0;
{
Rect aabb;
- //! true iff aabb hasn't been initialised yet
+ //! true iff aabb hasn't been initialized yet
bool initaabb;
int flags;
//generate data for the ending clipped info
if(y > window.maxy)
{
- //intial line to intersection (and degenerate)
+ //initial line to intersection (and degenerate)
n[2] = x + (window.maxy - y) * dx / dy;
//intersect coords
//generate data for the ending clipped info
if(y < window.miny)
{
- //intial line to intersection (and degenerate)
+ //initial line to intersection (and degenerate)
n[2] = x + (window.miny - y) * dx / dy;
//intersect coords
//generate data for the ending clipped info
if(x > window.maxx)
{
- //intial line to intersection (and degenerate)
+ //initial line to intersection (and degenerate)
n[2] = y + (window.maxx - x) * dy / dx;
n[0] = window.maxx;
//generate data for the ending clipped info
if(x < window.minx)
{
- //intial line to intersection (and degenerate)
+ //initial line to intersection (and degenerate)
n[2] = y + (window.minx - x) * dy / dx;
n[0] = window.minx;