Algorithm 2D Referential traduction
Hi, I am trying to build a function grapher, The user enters xmin, xmax, ymin, ymax, function. I got the x, y for all points. Now i want to translate this initial referential to a Canvas starting at 0,0 up to 250,250. Is there a short way or should i just check if x < 0 new x = (x - xmin) * (250 / (xmax - xmin)) ? etc .. Also ...