Computing heading
Frank Shearar
frank.shearar at rnid.org.uk
Mon Jan 5 13:10:07 UTC 2004
Bert Freudenberg wrote:
> And that's about it. You can browse the implementation of
> #bearingToPoint: to see the formula used. I'll attach my own
> project as
> an example.
Shouldn't #bearingToPoint: use #radiansToDegrees instead of a constant?
In other words,
^ ((deltaX >= 0 ifTrue: [90] ifFalse: [270])
- ((deltaY / deltaX) arcTan negated radiansToDegrees)) rounded
Since I'm reasonably sure the above isn't insane, I'll write some test cases
for #radiansToDegrees and post that plus the above change to the list.
frank
More information about the Squeak-dev
mailing list
|