.AddVectors LDA xSegmentCoordILo,Y \ Set xVectorX = xVectorY + (SS T) CLC \ ADC T \ starting with the low bytes STA xSegmentCoordILo,X LDA xSegmentCoordIHi,Y \ And then the high bytes ADC SS STA xSegmentCoordIHi,X LDA ySegmentCoordILo,Y \ Set yVectorX = yVectorY + (TT U) CLC \ ADC U \ starting with the low bytes STA ySegmentCoordILo,X LDA ySegmentCoordIHi,Y \ And then the high bytes ADC TT STA ySegmentCoordIHi,X LDA zSegmentCoordILo,Y \ Set zVectorX = zVectorY + (UU V) CLC \ ADC V \ starting with the low bytes STA zSegmentCoordILo,X LDA zSegmentCoordIHi,Y \ And then the high bytes ADC UU STA zSegmentCoordIHi,X RTS \ Return from the subroutineName: AddVectors [Show more] Type: Subroutine Category: Maths (Geometry) Summary: Add two three-axis vectors togetherContext: See this subroutine in context in the source code References: This subroutine is called as follows: * BuildCarObjects (Part 3 of 3) calls AddVectors * GetTrackSegment (Part 3 of 3) calls AddVectors
Given a three-axis variable vectorX and a three-axis variable vectorY, this routine calculates the following addition: [ (SS T) ] vectorX = vectorY + [ (TT U) ] [ (UU V) ]
Arguments: X The offset of the vectorX variable to update: * Index * 3 of the track segment to use for the section coordinates for the inner track * &F4 = xHelmetCoord * &FA = xCoord1 * &FD = xCoord2 Y The offset of the vectorY variable to add: * Index * 3 of the track segment to use for the section coordinates for the inner track * &F4 = xHelmetCoord * &FA = xCoord1 * &FD = xCoord2 (SS T) The value to add to the first axis (TT U) The value to add to the second axis (UU V) The value to add to the third axis
[X]
Variable xSegmentCoordIHi in workspace Main variable workspace
The high byte of the 3D x-coordinate for an inner track segment in the track segment buffer
[X]
Variable xSegmentCoordILo in workspace Main variable workspace
The low byte of the 3D x-coordinate for an inner track segment in the track segment buffer
[X]
Variable ySegmentCoordIHi in workspace Main variable workspace
The high byte of the 3D y-coordinate for an inner track segment in the track segment buffer
[X]
Variable ySegmentCoordILo in workspace Main variable workspace
The low byte of the 3D y-coordinate for an inner track segment in the track segment buffer
[X]
Variable zSegmentCoordIHi in workspace Main variable workspace
The high byte of the 3D z-coordinate for an inner track segment in the track segment buffer
[X]
Variable zSegmentCoordILo in workspace Main variable workspace
The low byte of the 3D z-coordinate for an inner track segment in the track segment buffer