MCPcopy Create free account
hub / github.com/codrops/RainEffect / _parseVal

Function _parseVal

demo/js/index.js:6737–6739  ·  view source on GitHub ↗
(v, d)

Source from the content-addressed store, hash-verified

6735 * @return {number} Parsed value
6736 */
6737 _parseVal = function(v, d) {
6738 return (v == null) ? d : (typeof(v) === "string" && v.charAt(1) === "=") ? parseInt(v.charAt(0) + "1", 10) * parseFloat(v.substr(2)) + d : parseFloat(v);
6739 },
6740
6741 /**
6742 * @private Translates strings like "40deg" or "40" or 40rad" or "+=40deg" or "270_short" or "-90_cw" or "+=45_ccw" to a numeric radian angle. Of course a starting/default value must be fed in too so that relative values can be calculated properly.

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected