Method: Processing::GraphicsContext#lerp

Defined in:
lib/processing/graphics_context.rb

#lerp(start, stop, amount) ⇒ Numeric

Returns the interpolated number between range start..stop.

Parameters:

  • start (Numeric)

    lower bound of the range

  • stop (Numeric)

    upper bound of the range

  • amount (Numeric)

    amount to interpolate

Returns:

  • (Numeric)

    interporated number

See Also:



2740
2741
2742
# File 'lib/processing/graphics_context.rb', line 2740

def lerp(start, stop, amount)
  start + (stop - start) * amount
end