I have min and max value of the scale and i want it to divide the scale in N partitions.
Let i have Min = 0 and Max = 200
.
That i have tried to get the interval for getting equal distance between two points as:
void Main() { double s = 012345678; double e = 123456789; double fx = (e - s)/10; double index = s; while(index <= e) { Console.WriteLine(index); index += fx; } }
which does some trick and somewhat divided it as i want, but not the solid solution. Sometimes the Min and Max values are too much high as:
Max: 564094825.8374691 Min: 544792373.69823289 Interval = (Max/ Min)/20;
Now it causing problem.
The Result distribution of scale result should be as:
Let xMin= 0 and xMax = 10, I want this scale to divide in 5 intervals Then it should return 0,2,4,6,8,10
Min and Max value could be negative as possible while drawing a graph for -5 to 5
x scale or -10 to -5
.
I went through this- Take set of values and change scale , is it somewhat relevant to my problem???
Please suggest me the way to achieve this..
thanks in Advance.