Skip to content

Commit

Permalink
Added alice.format.rotation to support rotation randomization
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Hasson committed Feb 4, 2012
1 parent 64a6945 commit 3ce1fb5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions js/src/alice.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,20 @@ alice.format = {
return dur + "ms";
},

/**
*
* @param params
* @returns
*/
rotation: function (params) {
"use strict";
var val = alice.duration(params);
if (params.randomness) {
val = alice.randomize(val, alice.percentage(params.randomness));
}
return val;
},

/**
*
*/
Expand Down

0 comments on commit 3ce1fb5

Please sign in to comment.