I want to draw a curve (a diode curve) in a picturebox using imagefrom bitmap. I have a problem now and it is my point data are saved as Double and it is really important to keep the precesion.
for example a point in the plot I have is like this:
Voltage: -0.175 Current: -9.930625E-06
Yes, it is a Double! now how can I have a point to do for example:
Point[] ptarray = new Point[3];
ptarray[0] = new Point(250, 250);
Is there an alternative to Point[] that accepts double values? I have a 500×500 picture box. is there a way to convert those values to valid points that can still save precesion? I am wotking with micro Ampers (10^-6) and Voltages!
Well, if
floatis enough precision, then you can use thePointFstruct:If you really need to, you can define your own
PointDstruct:Equality code originally from here.
The
ToPoint()method lets you convert it to aPointobject, though of course the precision will be truncated.