Get the min value elementwise between a vec3 and a scalar
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(vector), | intent(in) | :: | this |
Input vector |
||
real(kind=wp), | intent(in) | :: | val |
Input minimum value |
type(vector) pure elemental function min_vec(this, val) !! Get the min value elementwise between a vec3 and a scalar !> Input vector type(vector), intent(IN) :: this !> Input minimum value real(kind=wp), intent(IN) :: val min_vec = vector(min(this%x, val), min(this%y, val), min(this%z, val)) end function min_vec