MAL.Left

Previous  Next

 

ref_arr_out = MAL.Left( BYREF arr_out      AS ARRAY,

                        BYREF point_A      AS ARRAY,

                        BYREF point_B      AS ARRAY,

                        BYREF point_C      AS ARRAY,

                       [BYVAL bOn          AS INTEGER=FALSE],

                       [BYVAL nFrameOffset AS INTEGER=0] ) AS REFERENCE

 

ref_arr_out = MAL.Left( BYREF arr_out      AS ARRAY,

                        BYREF arr_in       AS ARRAY,

                        BYVAL point_A      AS INTEGER,

                        BYVAL point_B      AS INTEGER,

                        BYVAL point_C      AS INTEGER,

                       [BYVAL bOn          AS INTEGER=FALSE],

                       [BYVAL nFrameOffset AS INTEGER=0] ) AS REFERENCE

 


 

Check if point C is strictly to the left of the directed line through point A to B.  Returns 1.0 if it does, 0.0 if not.  Return values are always represented as REAL.

 

Example:

 

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

' Testing Left

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'

DIM Result( nFrames ) AS REAL

 

' Using Point Numbers

MAL.Left( Result, Position, 1, 2, 4 )

CALL PrintArray( REF( Result ) )

 

' Copy Points to separate arrays

DIM pA( nFrames, 1, 3 ) AS REAL

DIM pB( nFrames, 1, 3 ) AS REAL

DIM pC( nFrames, 1, 3 ) AS REAL

 

pA( *, 1 ) = Position( *, 1 )

pB( *, 1 ) = Position( *, 2 )

pC( *, 1 ) = Position( *, 4 )

 

MAL.Left( Result, pA, pB, pC )

CALL PrintArray( REF( Result ) )

 

' This should be the same

CALL PrintArray( MAL.Left( NULL, pA, pB, pC ) )