01.07.2013, 17:34
Yes konst should be <0
And yes i made a mistake when i was copying code.
it should be
if((u1>=0 || u1<=1) && (u2>=0 || u2<=1))
I did some testing and this is what it returned
BC = 0
DE = 1
FG = 1
IH = 0
JK = 1
LM = 1
For IH konst is -0.745452 and it returned 0. That is because float can have only 7 digits and that is not enough for precise calculation. I don't know if there is double or long double implementation for pawn.
LM is not intersecting the circle but it is still returning 1. I need t work on that.
And yes i made a mistake when i was copying code.
it should be
if((u1>=0 || u1<=1) && (u2>=0 || u2<=1))
I did some testing and this is what it returned
BC = 0
DE = 1
FG = 1
IH = 0
JK = 1
LM = 1
For IH konst is -0.745452 and it returned 0. That is because float can have only 7 digits and that is not enough for precise calculation. I don't know if there is double or long double implementation for pawn.
LM is not intersecting the circle but it is still returning 1. I need t work on that.