diff --git a/RangeApp/Camera.pde b/RangeApp/Camera.pde index 4a34711..f881f50 100644 --- a/RangeApp/Camera.pde +++ b/RangeApp/Camera.pde @@ -46,7 +46,7 @@ class Camera { if(mouseButton == RIGHT) { difX /= (float)(width); difY /= (float)(height); - _scale = epsilon + abs((1 - 4*(difX + difY)) * _oldScale); + _scale = f_EPSILON + abs((1 - 4*(difX + difY)) * _oldScale); _x = _oldX * _scale; _y = _oldY * _scale; } else { @@ -58,8 +58,8 @@ class Camera { _y = _oldY + difY; break; case 1: - float initAngle = atan((_initMY - height/2)/(epsilon + _initMX - width/2)); - float newAngle = atan((mouseY - height/2)/(epsilon + mouseX - width/2)); + float initAngle = atan((_initMY - height/2)/(f_EPSILON + _initMX - width/2)); + float newAngle = atan((mouseY - height/2)/(f_EPSILON + mouseX - width/2)); float delta = newAngle - initAngle; _angle = _oldAngle + delta; break; diff --git a/RangeApp/Properties.pde b/RangeApp/Properties.pde index 8a25565..7c8d74d 100644 --- a/RangeApp/Properties.pde +++ b/RangeApp/Properties.pde @@ -1,5 +1,3 @@ - - // Pallete color c_WHITE = color (255, 255, 255); color c_BLACK = color (0, 0, 0); @@ -30,11 +28,6 @@ color c_helpStroke = c_BLACK; color c_helpText = c_WHITE; int i_helpStrokeWidth = 2; -// Status Colors -color c_statusMode = c_YELLOW; -color c_statusBackground = c_PROCBLUE; -color c_statusText = c_WHITE; - // Point color c_pointStroke = c_BLACK; color c_pointDefault = c_WHITE; @@ -42,7 +35,6 @@ color c_pointSelect = color (100, 255, 100); int i_pointRad = 20; // Tree stuff -float f_INFINITY = 99999; int i_relationWidth = 2; int i_boundaryWidth = 3; @@ -60,3 +52,7 @@ String[] s_helpStrings = { "g: Select Point", "c: Clear Points" }; + +// Math Stuff +float f_EPSILON = 0.000001; +float f_INFINITY = 999999; diff --git a/RangeApp/RangeApp.pde b/RangeApp/RangeApp.pde index f2c8887..0009be1 100644 --- a/RangeApp/RangeApp.pde +++ b/RangeApp/RangeApp.pde @@ -5,14 +5,6 @@ Selector selector; Point nearestNeighbor; ArrayList pointList; boolean drawCon, drawHelp, drawTreeRelations, drawTreeBoundaries, drawGnoman, useSelector; -float epsilon = 0.000001; -int G_mode; -// 1 = SCALE -// 2 = PAN -// 3 = ROTATE -// 4 = PLACE [removed] -// 5 = CIRC SELECT -// 6 = RECT SELECT void setup() { size(800,800);