when I tried to calculate the homogeneous matrix in two different ways, there was a very small
discrepency, 0 and 0.000000000000000061229677524420688 are in the same location of the two matrice.
The number 0.000000000000000061229677524420688 is extremely close to 0, so I take them as exactly
the same number. I though if I plug then into Atan2(,), the answers should be the same.
But unexpectedly, the answer are totally different. Here is the code segment:
Dim b = Atan2(0.000000000000000061229677524420688, 0)
Dim c = Atan2(0, 0)
After I run the code in compliler, b is 1.57096, c is 0.
Your
atan2arguments are not valid in math sense, this function is not defined for both zeros.Note that first argument should be
r*sin(fi), the second one -r*cos(fi)for some anglefiand r>0In dotnet rules are - note they assign 0in the 4th case, while one might expect
NaNor some error:Your values fit to 5th and 3rd cases