lots and lots of bugfixes after running on reals hardware for the first time
This commit is contained in:
@ -238,7 +238,8 @@ class CircleTest
|
||||
end
|
||||
dx = y.sign*angular_direction unless y == 0
|
||||
end
|
||||
break if x*ty.sign*angular_direction>=tx*ty.sign*angular_direction && y*tx.sign*angular_direction<=ty*tx.sign*angular_direction
|
||||
break if x*ty.sign*angular_direction>=tx*ty.sign*angular_direction &&
|
||||
y*tx.sign*angular_direction<=ty*tx.sign*angular_direction
|
||||
end
|
||||
plot_pixel(tx+20, -ty+20, "o")
|
||||
return {:tx => tx, :ty => ty, :x => x, :y => y}
|
||||
|
@ -11,6 +11,8 @@ def calc_theta(x,y)
|
||||
end
|
||||
end
|
||||
|
||||
(-180..180).each do |deg|
|
||||
pp [deg, calc_theta(sin(1.0*deg/180*PI), cos(1.0*deg/180*PI))/PI*180]
|
||||
end
|
||||
pp calc_theta(5,0)/PI*180;
|
||||
|
||||
# (-180..180).each do |deg|
|
||||
# pp [deg, calc_theta(sin(1.0*deg/180*PI), cos(1.0*deg/180*PI))/PI*180]
|
||||
# end
|
Reference in New Issue
Block a user