(s)
| 871 | }); |
| 872 | }, |
| 873 | _replaceRandom = function _replaceRandom(s) { |
| 874 | return s.replace(_randomExp, function (match) { |
| 875 | //replaces all occurrences of random(...) in a string with the calculated random value. can be a range like random(-100, 100, 5) or an array like random([0, 100, 500]) |
| 876 | var arIndex = match.indexOf("[") + 1, |
| 877 | values = match.substring(arIndex || 7, arIndex ? match.indexOf("]") : match.length - 1).split(_commaDelimExp); |
| 878 | return random(arIndex ? values : +values[0], arIndex ? 0 : +values[1], +values[2] || 1e-5); |
| 879 | }); |
| 880 | }, |
| 881 | mapRange = function mapRange(inMin, inMax, outMin, outMax, value) { |
| 882 | var inRange = inMax - inMin, |
| 883 | outRange = outMax - outMin; |
no test coverage detected
searching dependent graphs…