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

Function _parseChange

demo/js/index.js:6727–6729  ·  view source on GitHub ↗
(e, b)

Source from the content-addressed store, hash-verified

6725 * @return {number} Amount of change between the beginning and ending values (relative values that have a "+=" or "-=" are recognized)
6726 */
6727 _parseChange = function(e, b) {
6728 return (typeof(e) === "string" && e.charAt(1) === "=") ? parseInt(e.charAt(0) + "1", 10) * parseFloat(e.substr(2)) : parseFloat(e) - parseFloat(b);
6729 },
6730
6731 /**
6732 * @private Takes a value and a default number, checks if the value is relative, null, or numeric and spits back a normalized number accordingly. Primarily used in the _parseTransform() function.

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected