.GetVerticalDelta LDA yObjectLo,Y \ Set yDelta(Hi Lo) = yObject(Hi Lo) for object #Y SEC \ - yObject(Hi Lo) for object #X SBC yObjectLo,X \ STA yDeltaLo \ starting with the low bytes LDA yObjectHi,Y \ And then the high bytes SBC yObjectHi,X STA yDeltaHi RTS \ Return from the subroutineName: GetVerticalDelta [Show more] Type: Subroutine Category: Maths (Geometry) Summary: Calculate the difference in the y-axis between two objects as a signed deltaContext: See this subroutine in context in the source code References: This subroutine is called as follows: * GetObjectAngles calls GetVerticalDelta
This routine calculates the following: yDelta(Hi Lo) = y-coordinate of object #Y - y-coordinate of object #X So yDelta(Hi Lo) contains the difference (the "delta") in the y-coordinate between the two objects, which is the difference in altitude.
Arguments: X The number of the first object Y The number of the second object
[X]
Variable yObjectHi (category: 3D objects)
The y-coordinates in 3D space for the 3D objects (high byte)
[X]
Variable yObjectLo (category: 3D objects)
The y-coordinates in 3D space for the 3D objects (low byte)