side Function

private pure function side(a, b, q)

Which side of the line from a to b q is on: > 0 left, < 0 right, 0 on it (twice the signed area of the triangle a, b, q).

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: a(2)

the line's two points, and the point tested

real(kind=wp), intent(in) :: b(2)

the line's two points, and the point tested

real(kind=wp), intent(in) :: q(2)

the line's two points, and the point tested

Return Value real(kind=wp)


Called by

proc~~side~~CalledByGraph proc~side side proc~cone_is_visible PolyhedralCone%cone_is_visible proc~cone_is_visible->proc~side

Source Code

    pure real(wp) function side(a, b, q)
        real(wp), intent(in) :: a(2), b(2), q(2)            !! the line's two points, and the point tested
        side = (b(1) - a(1)) * (q(2) - a(2)) - (q(1) - a(1)) * (b(2) - a(2))
    end function side