Nothing built in, but wouldn't be hard to create your own function to do it.
It's a simple enough formula.
What do your points look like?? That is, are they in array of Point objects or what??
This is TOTALLY off the top of my head:
Code:
Function Slope( pointArray() As Point ) AS Double
Dim ix As Integer
Dim avgX As Double = 0
Dim avgY As Double = 0
Dim pointCount As Integer = UBound(pointArray)+1
' first get the average X and average Y:
For ix = 0 To pointCount-1
avgX += pointArray(ix).X
avgY += pointArray(ix).Y
Next
avgX /= pointCount
avgY /= pointCount
' now get the top and bottom sums:
Dim topSum As Double = 0.0
Dim bottomSum As Double = 0.0
For ix = 0 To pointCount-1
Dim xdiff As Double = pointArray(ix).X - avgX
topSum += ( xdiff * ( pointArray(ix).Y - avgY ) )
bottomSum += ( xdiff * xdiff )
Next
Return topSum / bottomSum
End Function
That assumes that a Point is described as basically
Code:
Class Point
public X as Double
public Y as Double
End Class
Could have other methods, etc., of course.