Reversed the order of extract's parameters, to match the precedence set

by other functions. Fixes #1119
This commit is contained in:
ScottRippey
2013-01-08 16:15:44 -08:00
committed by Luke Page
parent 1abb5dd460
commit 80d9f387c0
2 changed files with 2 additions and 2 deletions

View File

@@ -356,7 +356,7 @@ tree.functions = {
shade: function(color, amount) {
return this.mix(this.rgb(0, 0, 0), color, amount);
},
extract: function(index, values) {
extract: function(values, index) {
index = index.value - 1; // (1-based index)
return values.value[index];
},

View File

@@ -125,5 +125,5 @@
#extract {
@anon: A B C 1 2 3;
result: extract(6, @anon) extract(5, @anon) extract(4, @anon) extract(3, @anon) extract(2, @anon) extract(1, @anon);
result: extract(@anon, 6) extract(@anon, 5) extract(@anon, 4) extract(@anon, 3) extract(@anon, 2) extract(@anon, 1);
}