method
IVec2.dot
IVec2.dot(a, b) -> int
Returns the integer dot product ax*bx + ay*by. Its sign tells you whether two directions point roughly the same way.
Example
program Demo {
handler Step phase Update {
let facing = IVec2.dot(heading, toTarget)
}
}