mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-09-01 13:32:42 +02:00
Enhanced lerp() to allow list/range u values to return lists of results.
This commit is contained in:
@@ -219,6 +219,8 @@ module test_lerp() {
|
||||
assert(lerp(-20,20,0.5) == 0);
|
||||
assert(lerp(-20,20,0.75) == 10);
|
||||
assert(lerp(-20,20,1) == 20);
|
||||
assert(lerp(-20,20,[0,0.25,0.5,0.75,1]) == [-20,-10,0,10,20]);
|
||||
assert(lerp(-20,20,[0:0.25:1]) == [-20,-10,0,10,20]);
|
||||
assert(lerp([10,10],[30,-10],0.5) == [20,0]);
|
||||
}
|
||||
test_lerp();
|
||||
|
Reference in New Issue
Block a user