swap the meaning of makeArray and toArray: makeArray, like makeObject, is a helper function for arguments processing (that wraps any non-array in an array), toArray, like in other libraries, is an alias for Array.prototype.slice.call
This commit is contained in:
parent
5cabb679f9
commit
5692195509
21 changed files with 88 additions and 88 deletions
|
|
@ -17,7 +17,7 @@ Ox.hsl <f> Takes RGB values and returns HSL values
|
|||
@*/
|
||||
Ox.hsl = function(rgb) {
|
||||
if (arguments.length == 3) {
|
||||
rgb = Ox.makeArray(arguments);
|
||||
rgb = Ox.toArray(arguments);
|
||||
}
|
||||
rgb = Ox.clone(rgb).map(function(val) {
|
||||
return val / 255;
|
||||
|
|
@ -64,7 +64,7 @@ Ox.rgb <f> Takes HSL values and returns RGB values
|
|||
|
||||
Ox.rgb = function(hsl) {
|
||||
if (arguments.length == 3) {
|
||||
hsl = Ox.makeArray(arguments);
|
||||
hsl = Ox.toArray(arguments);
|
||||
}
|
||||
hsl = Ox.clone(hsl);
|
||||
hsl[0] /= 360;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue