union Function

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

Union operation. Joins two SDFs together

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 union(d1, d2, k) result(res)
        !! Union operation. Joins two SDFs together
        
        !> 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 = min(d1, d2)
    end function union