linear_interpolation Function

private pure elemental function linear_interpolation(a, b, t) result(l)

Linear interpolation from a to b, with step t a + (b - a) * t = a * (1-t) + b * t for better floating-point precision

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: a
real(kind=8), intent(in) :: b
real(kind=8), intent(in) :: t

Return Value real(kind=8)


Called by

proc~~linear_interpolation~~CalledByGraph proc~linear_interpolation hex_geometries::linear_interpolation proc~hex_line hex_geometries::hex_line proc~hex_line->proc~linear_interpolation

Source Code

   pure elemental function linear_interpolation(a,b,t) result(l)
      !! Linear interpolation from a to b, with step t
      !! a + (b - a) * t = a * (1-t) + b * t
      !! for better floating-point precision
      real(8),intent(in)   :: a,b,t
      real(8)              :: l
      l = a * (1-t) + b * t
   end function linear_interpolation