1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-09-24 21:41:33 +02:00
Files
dotSCAD/docs/lib2x-lerp.md
Justin Lin b170cc7570 add doc
2021-01-04 10:22:49 +08:00

386 B

lerp

Linear interpolate the vector v1 to v2.

Since: 2.5

Parameters

  • v1 : Minimum value of random number range. Default to 0.
  • v2 : Maximum value of random number range. Default to 1.
  • amt : The amount of interpolation. Some value between 0.0 and 1.0.

Examples

use <util/lerp.scad>;

assert(lerp([0, 0, 0], [100, 100, 100], 0.5) == [50, 50, 50]);