/* 
Thanks for looking at my source :)
Please don't use it without my permission!
wartex8.com/calc 
*/

//Trig Variables
TrigSetToDegree = 0;

// Mathematical Variables - ie doesnt support "const"
fineness = 20000;
pi = Math.PI;
e  = Math.E;
inf = 9E+1000;
//i = sqrt(-1);   work with it, maybe as a string

//Graphing Variables
xGraphRange = [-10,10];
yGraphRange = [-10,10];
Xmin = -10.0;
Ymin = -10.0;
Xmax = 10.0;
Ymax = 10.0;

//theColor = "black";
graphLineWidth = 1.25;
numberOfEquations = 1;
increment = (abs(Xmax) + abs(Xmin))/fineness; 
derivativePrecision = .000000001;
	//derivativePrecision - closer to 0 gives a more accurate deriv for 1/x
	//derivativePrecision - closer to 1 gives a more accurate deriv for x

functionList = ['sin','cos','tan','csc','sec','cot','asin','acos','atan','acsc','asec','acot','gcd','gcf',"max","min","abs",'ln','log','sqrt',"ceil","floor","round",'random'];
graphColor = ['green','blue','brown','purple','red','orange']; 
acceptedPowList = /[0-9\.xy]/gi;
acceptedNumList = /[0-9\.]/gi; 

myCanvas = document.getElementById('myCanvas'); //may be able to ignore this - is this a problem
pointer = myCanvas.getContext('2d');
canvasDiv = document.getElementById('canvasdiv');
//equations = document.getElementById('equations');
xoptionsDiv = document.getElementById('xoptions');
solveforInput = document.getElementById('solvefor');
//formatedInputDiv = document.getElementById('formatedInput');
xInputRange = document.getElementById('xInputRange');
yInputRange = document.getElementById('yInputRange');
trigDiv = document.getElementById('trig'); //may be replaced with trigType, for some reason I can't remove it

//Debug
updateDebug = 1;
eqByNumDebug = 0;   //norm 0
parametricEnabled = 0;
debug = document.getElementById('debug');
debug2 = document.getElementById('debug2');
debug3 = document.getElementById('debug3');
debugEquations = ["x^x", "x^2", "x^(-1)", "x^(-3)", "x/(x+2)", "x/(sin(x))", "(sin(x))^x", "x^(sin(x))", "2^x", ".1^x"]; //keys 0-9

//xCanvasOrigin and yCanvasOrigin are linked to these
height = 200; //myCanvas.height 
width = 200; //myCanvas.width

xCanvasOrigin = toCanvasX(0); //width/2 on runtime if origin is center
yCanvasOrigin = toCanvasY(0); //height/2 on runtime if origin is center

input = [];
unmodifiedInput = [];
thisvar = [];
layer = [];
trigType = [];
graphType = [];
dimensions = [];
showSettings = -1;

//xTable = []; //necessary?
//yTable = []; //necessary?
