Initalise vec4 from a vec3 and Scalar e.g vec4 = [vec3%x, vec3%y, vec3%z, scalar]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(vector), | intent(in) | :: | vec |
Input vec3 |
||
real(kind=wp), | intent(in) | :: | val |
Input Scalar |
type(vec4) function init_vec4_vector_real(vec, val) result(out) !! Initalise vec4 from a vec3 and Scalar !! e.g vec4 = [vec3%x, vec3%y, vec3%z, scalar] use vector_class !> Input vec3 type(vector), intent(in) :: vec !> Input Scalar real(kind=wp), intent(in) :: val out%x = vec%x out%y = vec%y out%z = vec%z out%p = val end function init_vec4_vector_real