是一個(gè)內(nèi)部對(duì)象,提供基本數(shù)學(xué)函數(shù)和常數(shù)。
Math.[{property | method}]
Math 對(duì)象不能用 new 運(yùn)算符創(chuàng)建,如果試圖這樣做則給出錯(cuò)誤。在裝載腳本引擎時(shí)由該引擎創(chuàng)建該對(duì)象。其所有方法和屬性在腳本中總是可用。
E 屬性 | LN2 屬性 | LN10 屬性 | LOG2E 屬性 | LOG10E 屬性 | PI 屬性 | SQRT1_2 屬性 | SQRT2 屬性
abs 方法 | acos 方法 | asin 方法 | atan 方法 | atan2 方法 | ceil 方法 | cos 方法 | exp 方法 | floor 方法 | log 方法 | max 方法 | min 方法 | pow 方法 | random 方法 | round 方法 | sin 方法 | sqrt 方法 | tan 方法