<-- Previous || Up || Next -->

Make Line Function
Math Geometry Class

Public Function MakeLine( _
      ByVal vX1 As Variant _
    , ByVal vY1 As Variant _
    , ByVal vX2 As Variant _
    , ByVal vY2 As Variant _
    ) As Variant

Create a "line (segment)" value from two pairs of real numbers.
Each pair of numbers represents the X and Y coordinates of one of the points on the line segment.

Example:
    Assuming
       Dim varLine1 As Variant
       varLine1 = MakeLine(2, 3, 4, 5)
    for example
       VarType(varPoint1) = vbVariant + vbArray
       LBound(varPoint1) = 0
       UBound(varPoint1) = 1
       LBound(varPoint(0)) = 0
       UBound(varPoint(0)) = 1
       LBound(varPoint(1)) = 0
       UBound(varPoint(1)) = 1
       varPoint(0)(0) = 2
       varPoint(0)(1) = 3
       varPoint(1)(0) = 4
       varPoint(1)(1) = 5
    and
       LinesIntersect(varLine1, varLine1) = True
See also:
    MakePoint Function
    ArgumentsToVariant Function
    LinesIntersect Function
vX1: Number representing the X-coordinate of the first point on the line segment.
vY1: Number representing the Y-coordinate of the first point on the line segment.
vX2: Number representing the X-coordinate of the second point on the line segment.
vY2: Number representing the Y-coordinate of the second point on the line segment.
Note: Function will always return the "line" even if one or more of the arguments is not a number.
Note: The function will generate an error if any of the arguments is an object pointer or an error.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.