subtraction Function

public pure function subtraction(d1, d2, k) result(res)

Subtraction operator. Takes one SDF from another. Take the first SDF from the 2nd SDF

Arguments

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

SDF_1 distance

real(kind=wp), intent(in) :: d2

SDF_2 distance

real(kind=wp), intent(in) :: k

unused factor.

Return Value real(kind=wp)


Source Code

    pure function subtraction(d1, d2, k) result(res)
        !! Subtraction operator. Takes one SDF from another.
        !! Take the first SDF from the 2nd SDF

        !> SDF_1 distance
        real(kind=wp), intent(IN) :: d1
        !> SDF_2 distance
        real(kind=wp), intent(IN) :: d2
        !> unused factor.
        real(kind=wp), intent(IN) :: k
    
        real(kind=wp) :: res

        res = max(-d1, d2)

    end function subtraction