G={};
(function () {' use strict '
G.=Math;
G. athProps='E LN10 LN2 LOG2E LOG10E PI SQRT1_2 SQRT2 abs a cosine asin atan ceil cos exp floor log round sin SQRT tan Max min' atan2 pow. The split (' ');
For (var I=0; I & lt; G. athProps. Length; I++) {
G [g. athProps [I]]=g. [g. athProps [I]].
}
G.M.T WO_PI=G.M.P I * 2;
Refer to the above g={}; What is the role of
CodePudding user response:
Is not empty mapCodePudding user response:
Is the default an empty object, and then some properties and methods related to scientific computing put in to g below can direct access to the properties and methods is in g. athProps within those, then add g. and g. athProps, but by g. can access properties and methods under the Math completeNo context, don't know what's the use of the concrete, lazy?
CodePudding user response:
An empty Object to g assignmentG in this code can be as a namespace, you can add attributes for it