Get the max 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 max value |
type(vector) pure elemental function max_vec(this, val) !! Get the max value elementwise between a vec3 and a scalar !> Input vector type(vector), intent(IN) :: this !> Input max value real(kind=wp), intent(IN) :: val max_vec = vector(max(this%x, val), max(this%y, val), max(this%z, val)) end function max_vec