求js(JavaScript)所有数学函数

2025-05-19 07:41:42
推荐回答(3个)
回答1:

function Math(){};
Math.prototype=new Object();
/**
  * Property E
  * @memberOf Math
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.    
 */
Math.E=0;
/**
  * Property LN10
  * @memberOf Math
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.    
 */
Math.LN10=0;
/**
  * Property LN2
  * @memberOf Math
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.
 */
Math.LN2=0;
/**
  * Property LOG2E
  * @memberOf Math
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.    
 */
Math.LOG2E=0;
/**
  * Property LOG10E
  * @memberOf Math
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition. 
 */
Math.LOG10E=0;
/**
  * Property PI
  * @memberOf Math
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.  
 */
Math.PI=0;
/**
  * Property SQRT1_2
  * @memberOf Math
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.    
 */
Math.SQRT1_2=0;
/**
  * Property SQRT2
  * @memberOf Math
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition. 
 */
Math.SQRT2=0;
/**
  * function abs(x)
  * @memberOf Math
  * @param {Number} x
  * @type Number
  * @returns {Number}
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.     
 */
Math.abs=function(x){return 0;};
/**
  * function acos(x)
  * @memberOf Math
  * @param {Number} x
  * @type Number
  * @returns {Number}
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.
 */
Math.acos=function(x){return 0;};
/**
  * function asin(x)
  * @memberOf Math
  * @param {Number} x
  * @type Number
  * @returns {Number}
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.  
 */
Math.asin=function(x){return 0;};
/**
  * function atan(x)
  * @memberOf Math
  * @param {Number} x
  * @type Number
  * @returns {Number}
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.
 */
Math.atan=function(x){return 0;};
/**
  * function atan2(x,y)
  * @memberOf Math
  * @param {Number} x
  * @param {Number} y
  * @type Number
  * @returns {Number}
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.  
 */
Math.atan2=function(x,y){return 0;};
/**
  * function ceil(x)
  * @memberOf Math
  * @param {Number} x
  * @type Number
  * @returns {Number}
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.    
 */
Math.ceil=function(x){return 0;};
/**
  * function cos(x)
  * @memberOf Math
  * @param {Number} x
  * @type Number
  * @returns {Number}
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.  
 */
Math.cos=function(x){return 0;};
/**
  * function exp(x)
  * @memberOf Math
  * @param {Number} x
  * @type Number
  * @returns {Number}
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition. 
 */
Math.exp=function(x){return 0;};
/**
  * function floor(x)
  * @memberOf Math
  * @param {Number} x
  * @type Number
  * @returns {Number}
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.  
 */
Math.floor=function(x){return 0;};
/**
  * function log(x)
  * @memberOf Math
  * @param {Number} x
  * @type Number
  * @returns {Number}
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.    
 */
Math.log=function(x){return 0;};
/**
  * function max(arg)
  * @memberOf Math
  * @param {Number} args
  * @type Number
  * @returns {Number}
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.  
 */
Math.max=function(args){return 0;};
/**
  * function min(arg)
  * @memberOf Math
  * @param {Number} args
  * @type Number
  * @returns {Number}
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.    
 */
Math.min=function(args){return 0;};
/**
  * function pow(x,y)
  * @memberOf Math
  * @param {Number} x
  * @param {Number} y
  * @type Number
  * @returns {Number}
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.    
 */
Math.pow=function(x,y){return 0;};
/**
  * function pow()
  * @memberOf Math
  * @type Number
  * @returns {Number}
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.     
 */
Math.random=function(){return 0;};
/**
  * function round(x)
  * @memberOf Math
  * @param {Number} x
  * @type Number
  * @returns {Number}
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.   
 */
Math.round=function(x){return 0;};
/**
  * function sin(x)
  * @memberOf Math
  * @param {Number} x
  * @type Number
  * @returns {Number}
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.    
 */
Math.sin=function(x){return 0;};
/**
  * function sqrt(x)
  * @memberOf Math
  * @param {Number} x
  * @type Number
  * @returns {Number}
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.     
 */
Math.sqrt=function(x){return 0;};
/**
  * function tan(x)
  * @memberOf Math
  * @param {Number} x
  * @type Number
  * @returns {Number}
  * @since   Standard ECMA-262 3rd. Edition 
  * @since   Level 2 Document Object Model Core Definition.    
 */
Math.tan=function(x){return 0;};

回答2:

console.log(Math)就能找到所有的Math对象的方法了

回答3:

Math 求绝对值 我貌似就知道这一个·