4 ms·
Hoping somebody could explain to me why methods are written like so: P['absoluteValue'] = P['abs'] = function () { } instead of P.absoluteValue = p.abs = fun
by neals 12y ago
Hoping somebody could explain to me why methods are written like so:
P['absoluteValue'] = P['abs'] = function () { }
instead of
P.absoluteValue = p.abs = function () {}
- goblin89 12y agoIndeed. And, interestingly, Decimal.format (alone?) is declared with dot notation[0]. Overall coding style feels relatively consistent so there must be some reasoning behind these decisions. [0] https://github.com/MikeMcl/decimal.js/blob/master/decimal.js#L3957 https://github.com/MikeMcl/decimal.js/blob/master/decimal.js...