seg_in_segment Function

private pure elemental function seg_in_segment(a, b) result(res)

Check if the one segment is completely within another segment.

This function determines whether the segment a is entirely within the range specified by the segment b.

Arguments

Type IntentOptional Attributes Name
type(segment_t), intent(in) :: a
type(segment_t), intent(in) :: b

Return Value logical


Source Code

   pure elemental function seg_in_segment(a, b) result(res)
      implicit none
      type(segment_t), intent(in) :: a, b
      logical :: res

      res =  b%min <= a%min .and. a%max <= b%max
   end function seg_in_segment