Before some police gets uptight , I suggest to move this to real discussion forum.
I am sorry, due to some technical difficulties with local internet provider part of the post got missed.
I generally check inputs, to prevent GIGO.
So to get back to solution and skip all the superfluous fluff - if I add
radius = .1;
as indicated - all is well.
????
This is for those who wanted to see the code.
float radius_new = (float) IMG_circle[1].radius - (float) IMG_circle[0].radius;
printf("\nradius differece between base and cicrcle %i %f", R,
radius_new);
float hypotenuse;
float hypotenuse_new;
hypotenuse = 1.0 - .1; float base = 1.0;
hypotenuse_new = base - (float) radius_new; hypotenuse_new = base -( (float) IMG_circle[1].radius - (float) IMG_circle[0].radius);
printf("\nBase circle radius %f ",(float) IMG_circle[0].radius);
printf("\nCurrent circle radius %f ",(float) IMG_circle[1].radius);
printf("\ndiff (hypotenuse_new) %f ",(float) IMG_circle[1].radius - (float) IMG_circle[0].radius);
printf("\ndiff (hypotenuse_new) %f ",(float) IMG_circle[0].radius - (float) IMG_circle[1].radius);
printf("\nnew hypotenuse of circle of radius %f %i %f", radius_new, (int) R,
(float) hypotenuse_new);
And here is current output
radius differece between base and cicrcle 0 0.100000
Base circle radius 1.000000
Current circle radius 0.909091
diff (hypotenuse_new) -0.090909
diff (hypotenuse_new) 0.090909
new hypotenuse of circle of radius -0.090909 0 1.090909
hypotenuse of cicrcle 1 0.810000
Plase note that the first printf prints POSITIVE radius - which I assumed was correct.
Using SAME values the "current circle radius" CHANGED.
I am really not sure where is my error and how to solve it.
And that is just beginning of the calculations...
float radius = IMG_circle[1].radius - IMG_circle[0].radius;
printf("\nradius differece between base and cicrcle %i %f", R,
radius);
float hypotenuse;
hypotenuse = 1.0 - .1; printf("\nhypotenuse of cicrcle %i %f", (int) R + 1,
hypotenuse);
radius = .1;
hypotenuse = 1.0 - (float) radius;
printf("\nhypotenuse of cicrcle %i %f", (int) R + 1,
hypotenuse);
radius differece between base and cicrcle 0 0.100000
hypotenuse of cicrcle 1 0.900000
hypotenuse of cicrcle 1 1.090909