module-barejs_polyfill.Math.html 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Class: Math</title>
  6. <script src="scripts/prettify/prettify.js"> </script>
  7. <script src="scripts/prettify/lang-css.js"> </script>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  12. <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  13. </head>
  14. <body>
  15. <div id="main">
  16. <h1 class="page-title">Class: Math</h1>
  17. <section>
  18. <header>
  19. <h2><span class="attribs"><span class="type-signature"></span></span>
  20. <span class="ancestors"><a href="module-barejs_polyfill.html">barejs/polyfill</a>.</span>Math<span class="signature">()</span><span class="type-signature"></span></h2>
  21. </header>
  22. <article>
  23. <div class="container-overview">
  24. <h4 class="name" id="Math"><span class="type-signature"></span>new Math<span class="signature">()</span><span class="type-signature"></span></h4>
  25. <div class="description">
  26. <p>Polyfills for <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math">Math</a>.</p>
  27. </div>
  28. <dl class="details">
  29. <dt class="tag-source">Source:</dt>
  30. <dd class="tag-source"><ul class="dummy"><li>
  31. <a href="polyfill_Math.js.html">polyfill/Math.js</a>, <a href="polyfill_Math.js.html#line17">line 17</a>
  32. </li></ul></dd>
  33. </dl>
  34. </div>
  35. <h3 class="subsection-title">Methods</h3>
  36. <h4 class="name" id=".acosh"><span class="type-signature">(static) </span>acosh<span class="signature">(_x)</span><span class="type-signature"> &rarr; {number}</span></h4>
  37. <div class="description">
  38. <p>The Math.acosh() function returns the hyperbolic arc-cosine of a number.</p>
  39. </div>
  40. <h5>Parameters:</h5>
  41. <table class="params">
  42. <thead>
  43. <tr>
  44. <th>Name</th>
  45. <th>Type</th>
  46. <th class="last">Description</th>
  47. </tr>
  48. </thead>
  49. <tbody>
  50. <tr>
  51. <td class="name"><code>_x</code></td>
  52. <td class="type">
  53. <span class="param-type">number</span>
  54. </td>
  55. <td class="description last"><p>The value to calculate the arc-cosine of.</p></td>
  56. </tr>
  57. </tbody>
  58. </table>
  59. <dl class="details">
  60. <dt class="tag-source">Source:</dt>
  61. <dd class="tag-source"><ul class="dummy"><li>
  62. <a href="polyfill_Math.js.html">polyfill/Math.js</a>, <a href="polyfill_Math.js.html#line157">line 157</a>
  63. </li></ul></dd>
  64. </dl>
  65. <h5>Returns:</h5>
  66. <div class="param-desc">
  67. <p>The hyperbolic arc-cosine.</p>
  68. </div>
  69. <dl>
  70. <dt>
  71. Type
  72. </dt>
  73. <dd>
  74. <span class="param-type">number</span>
  75. </dd>
  76. </dl>
  77. <h4 class="name" id=".asinh"><span class="type-signature">(static) </span>asinh<span class="signature">(_x)</span><span class="type-signature"> &rarr; {number}</span></h4>
  78. <div class="description">
  79. <p>The Math.asinh() function returns the hyperbolic arcsine of a number.</p>
  80. </div>
  81. <h5>Parameters:</h5>
  82. <table class="params">
  83. <thead>
  84. <tr>
  85. <th>Name</th>
  86. <th>Type</th>
  87. <th class="last">Description</th>
  88. </tr>
  89. </thead>
  90. <tbody>
  91. <tr>
  92. <td class="name"><code>_x</code></td>
  93. <td class="type">
  94. <span class="param-type">number</span>
  95. </td>
  96. <td class="description last"><p>The value to calculate the arcsine of.</p></td>
  97. </tr>
  98. </tbody>
  99. </table>
  100. <dl class="details">
  101. <dt class="tag-source">Source:</dt>
  102. <dd class="tag-source"><ul class="dummy"><li>
  103. <a href="polyfill_Math.js.html">polyfill/Math.js</a>, <a href="polyfill_Math.js.html#line178">line 178</a>
  104. </li></ul></dd>
  105. </dl>
  106. <h5>Returns:</h5>
  107. <div class="param-desc">
  108. <p>The hyperbolic arcsine.</p>
  109. </div>
  110. <dl>
  111. <dt>
  112. Type
  113. </dt>
  114. <dd>
  115. <span class="param-type">number</span>
  116. </dd>
  117. </dl>
  118. <h4 class="name" id=".atanh"><span class="type-signature">(static) </span>atanh<span class="signature">(_x)</span><span class="type-signature"> &rarr; {number}</span></h4>
  119. <div class="description">
  120. <p>The Math.atanh() function returns the hyperbolic arctangent of a number.</p>
  121. </div>
  122. <h5>Parameters:</h5>
  123. <table class="params">
  124. <thead>
  125. <tr>
  126. <th>Name</th>
  127. <th>Type</th>
  128. <th class="last">Description</th>
  129. </tr>
  130. </thead>
  131. <tbody>
  132. <tr>
  133. <td class="name"><code>_x</code></td>
  134. <td class="type">
  135. <span class="param-type">number</span>
  136. </td>
  137. <td class="description last"><p>The value to calculate the arctangent of.</p></td>
  138. </tr>
  139. </tbody>
  140. </table>
  141. <dl class="details">
  142. <dt class="tag-source">Source:</dt>
  143. <dd class="tag-source"><ul class="dummy"><li>
  144. <a href="polyfill_Math.js.html">polyfill/Math.js</a>, <a href="polyfill_Math.js.html#line208">line 208</a>
  145. </li></ul></dd>
  146. </dl>
  147. <h5>Returns:</h5>
  148. <div class="param-desc">
  149. <p>The hyperbolic arctangent.</p>
  150. </div>
  151. <dl>
  152. <dt>
  153. Type
  154. </dt>
  155. <dd>
  156. <span class="param-type">number</span>
  157. </dd>
  158. </dl>
  159. <h4 class="name" id=".cbrt"><span class="type-signature">(static) </span>cbrt<span class="signature">(_x)</span><span class="type-signature"> &rarr; {number}</span></h4>
  160. <div class="description">
  161. <p>The Math.cbrt() function returns the cube root of a number.</p>
  162. </div>
  163. <h5>Parameters:</h5>
  164. <table class="params">
  165. <thead>
  166. <tr>
  167. <th>Name</th>
  168. <th>Type</th>
  169. <th class="last">Description</th>
  170. </tr>
  171. </thead>
  172. <tbody>
  173. <tr>
  174. <td class="name"><code>_x</code></td>
  175. <td class="type">
  176. <span class="param-type">number</span>
  177. </td>
  178. <td class="description last"><p>The number to get the cube root of.</p></td>
  179. </tr>
  180. </tbody>
  181. </table>
  182. <dl class="details">
  183. <dt class="tag-source">Source:</dt>
  184. <dd class="tag-source"><ul class="dummy"><li>
  185. <a href="polyfill_Math.js.html">polyfill/Math.js</a>, <a href="polyfill_Math.js.html#line33">line 33</a>
  186. </li></ul></dd>
  187. </dl>
  188. <h5>Returns:</h5>
  189. <div class="param-desc">
  190. <p>The cube root of the number</p>
  191. </div>
  192. <dl>
  193. <dt>
  194. Type
  195. </dt>
  196. <dd>
  197. <span class="param-type">number</span>
  198. </dd>
  199. </dl>
  200. <h4 class="name" id=".clz32"><span class="type-signature">(static) </span>clz32<span class="signature">(_x)</span><span class="type-signature"> &rarr; {number}</span></h4>
  201. <div class="description">
  202. <p>The Math.clz32() function returns the number of leading zero bits in the 32-bit binary representation of a number.
  203. &quot;clz32&quot; is short for CountLeadingZeroes32.</p>
  204. </div>
  205. <h5>Parameters:</h5>
  206. <table class="params">
  207. <thead>
  208. <tr>
  209. <th>Name</th>
  210. <th>Type</th>
  211. <th class="last">Description</th>
  212. </tr>
  213. </thead>
  214. <tbody>
  215. <tr>
  216. <td class="name"><code>_x</code></td>
  217. <td class="type">
  218. <span class="param-type">number</span>
  219. </td>
  220. <td class="description last"></td>
  221. </tr>
  222. </tbody>
  223. </table>
  224. <dl class="details">
  225. <dt class="tag-source">Source:</dt>
  226. <dd class="tag-source"><ul class="dummy"><li>
  227. <a href="polyfill_Math.js.html">polyfill/Math.js</a>, <a href="polyfill_Math.js.html#line96">line 96</a>
  228. </li></ul></dd>
  229. </dl>
  230. <h5>Returns:</h5>
  231. <dl>
  232. <dt>
  233. Type
  234. </dt>
  235. <dd>
  236. <span class="param-type">number</span>
  237. </dd>
  238. </dl>
  239. <h4 class="name" id=".cosh"><span class="type-signature">(static) </span>cosh<span class="signature">(_x)</span><span class="type-signature"> &rarr; {number}</span></h4>
  240. <div class="description">
  241. <p>The Math.cosh() function returns the hyperbolic cosine of a number.</p>
  242. </div>
  243. <h5>Parameters:</h5>
  244. <table class="params">
  245. <thead>
  246. <tr>
  247. <th>Name</th>
  248. <th>Type</th>
  249. <th class="last">Description</th>
  250. </tr>
  251. </thead>
  252. <tbody>
  253. <tr>
  254. <td class="name"><code>_x</code></td>
  255. <td class="type">
  256. <span class="param-type">number</span>
  257. </td>
  258. <td class="description last"><p>The value to calculate the cosine of.</p></td>
  259. </tr>
  260. </tbody>
  261. </table>
  262. <dl class="details">
  263. <dt class="tag-source">Source:</dt>
  264. <dd class="tag-source"><ul class="dummy"><li>
  265. <a href="polyfill_Math.js.html">polyfill/Math.js</a>, <a href="polyfill_Math.js.html#line146">line 146</a>
  266. </li></ul></dd>
  267. </dl>
  268. <h5>Returns:</h5>
  269. <div class="param-desc">
  270. <p>The hyperbolic cosine.</p>
  271. </div>
  272. <dl>
  273. <dt>
  274. Type
  275. </dt>
  276. <dd>
  277. <span class="param-type">number</span>
  278. </dd>
  279. </dl>
  280. <h4 class="name" id=".expm1"><span class="type-signature">(static) </span>expm1<span class="signature">(_x)</span><span class="type-signature"> &rarr; {number}</span></h4>
  281. <div class="description">
  282. <p>The Math.expm1() function returns e^x - 1, where x is the argument, and e the base of the natural logarithms.</p>
  283. </div>
  284. <h5>Parameters:</h5>
  285. <table class="params">
  286. <thead>
  287. <tr>
  288. <th>Name</th>
  289. <th>Type</th>
  290. <th class="last">Description</th>
  291. </tr>
  292. </thead>
  293. <tbody>
  294. <tr>
  295. <td class="name"><code>_x</code></td>
  296. <td class="type">
  297. <span class="param-type">number</span>
  298. </td>
  299. <td class="description last"><p>The number.</p></td>
  300. </tr>
  301. </tbody>
  302. </table>
  303. <dl class="details">
  304. <dt class="tag-source">Source:</dt>
  305. <dd class="tag-source"><ul class="dummy"><li>
  306. <a href="polyfill_Math.js.html">polyfill/Math.js</a>, <a href="polyfill_Math.js.html#line44">line 44</a>
  307. </li></ul></dd>
  308. </dl>
  309. <h5>Returns:</h5>
  310. <div class="param-desc">
  311. <p>A number representing e^x - 1, where e is Euler's number and x is the argument.</p>
  312. </div>
  313. <dl>
  314. <dt>
  315. Type
  316. </dt>
  317. <dd>
  318. <span class="param-type">number</span>
  319. </dd>
  320. </dl>
  321. <h4 class="name" id=".hypot"><span class="type-signature">(static) </span>hypot<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
  322. <div class="description">
  323. <p>The Math.hypot() function returns the square root of the sum of squares of its arguments.</p>
  324. </div>
  325. <dl class="details">
  326. <dt class="tag-source">Source:</dt>
  327. <dd class="tag-source"><ul class="dummy"><li>
  328. <a href="polyfill_Math.js.html">polyfill/Math.js</a>, <a href="polyfill_Math.js.html#line53">line 53</a>
  329. </li></ul></dd>
  330. </dl>
  331. <h5>Returns:</h5>
  332. <div class="param-desc">
  333. <p>The square root of the sum of squares of its arguments.</p>
  334. </div>
  335. <dl>
  336. <dt>
  337. Type
  338. </dt>
  339. <dd>
  340. <span class="param-type">number</span>
  341. </dd>
  342. </dl>
  343. <h4 class="name" id=".imul"><span class="type-signature">(static) </span>imul<span class="signature">(_a, _b)</span><span class="type-signature"> &rarr; {number}</span></h4>
  344. <div class="description">
  345. <p>The Math.imul() function returns the result of the C-like 32-bit multiplication of the two parameters.</p>
  346. </div>
  347. <h5>Parameters:</h5>
  348. <table class="params">
  349. <thead>
  350. <tr>
  351. <th>Name</th>
  352. <th>Type</th>
  353. <th class="last">Description</th>
  354. </tr>
  355. </thead>
  356. <tbody>
  357. <tr>
  358. <td class="name"><code>_a</code></td>
  359. <td class="type">
  360. <span class="param-type">number</span>
  361. </td>
  362. <td class="description last"><p>Operand A.</p></td>
  363. </tr>
  364. <tr>
  365. <td class="name"><code>_b</code></td>
  366. <td class="type">
  367. <span class="param-type">number</span>
  368. </td>
  369. <td class="description last"><p>Operand B.</p></td>
  370. </tr>
  371. </tbody>
  372. </table>
  373. <dl class="details">
  374. <dt class="tag-source">Source:</dt>
  375. <dd class="tag-source"><ul class="dummy"><li>
  376. <a href="polyfill_Math.js.html">polyfill/Math.js</a>, <a href="polyfill_Math.js.html#line71">line 71</a>
  377. </li></ul></dd>
  378. </dl>
  379. <h5>Returns:</h5>
  380. <div class="param-desc">
  381. <p>The result of the multiplication.</p>
  382. </div>
  383. <dl>
  384. <dt>
  385. Type
  386. </dt>
  387. <dd>
  388. <span class="param-type">number</span>
  389. </dd>
  390. </dl>
  391. <h4 class="name" id=".log1p"><span class="type-signature">(static) </span>log1p<span class="signature">(_x)</span><span class="type-signature"> &rarr; {number}</span></h4>
  392. <div class="description">
  393. <p>The Math.log1p() function returns the natural logarithm (base e) of 1 + a number.</p>
  394. </div>
  395. <h5>Parameters:</h5>
  396. <table class="params">
  397. <thead>
  398. <tr>
  399. <th>Name</th>
  400. <th>Type</th>
  401. <th class="last">Description</th>
  402. </tr>
  403. </thead>
  404. <tbody>
  405. <tr>
  406. <td class="name"><code>_x</code></td>
  407. <td class="type">
  408. <span class="param-type">number</span>
  409. </td>
  410. <td class="description last"><p>The value to get the logarithm of.</p></td>
  411. </tr>
  412. </tbody>
  413. </table>
  414. <dl class="details">
  415. <dt class="tag-source">Source:</dt>
  416. <dd class="tag-source"><ul class="dummy"><li>
  417. <a href="polyfill_Math.js.html">polyfill/Math.js</a>, <a href="polyfill_Math.js.html#line115">line 115</a>
  418. </li></ul></dd>
  419. </dl>
  420. <h5>Returns:</h5>
  421. <div class="param-desc">
  422. <p>The logarithm of 1 + _x.</p>
  423. </div>
  424. <dl>
  425. <dt>
  426. Type
  427. </dt>
  428. <dd>
  429. <span class="param-type">number</span>
  430. </dd>
  431. </dl>
  432. <h4 class="name" id=".log2"><span class="type-signature">(static) </span>log2<span class="signature">(_x)</span><span class="type-signature"> &rarr; {number}</span></h4>
  433. <div class="description">
  434. <p>The Math.log2() function returns the base 2 logarithm of a number.</p>
  435. </div>
  436. <h5>Parameters:</h5>
  437. <table class="params">
  438. <thead>
  439. <tr>
  440. <th>Name</th>
  441. <th>Type</th>
  442. <th class="last">Description</th>
  443. </tr>
  444. </thead>
  445. <tbody>
  446. <tr>
  447. <td class="name"><code>_x</code></td>
  448. <td class="type">
  449. <span class="param-type">number</span>
  450. </td>
  451. <td class="description last"><p>The value to get the base 2 logarithm of.</p></td>
  452. </tr>
  453. </tbody>
  454. </table>
  455. <dl class="details">
  456. <dt class="tag-source">Source:</dt>
  457. <dd class="tag-source"><ul class="dummy"><li>
  458. <a href="polyfill_Math.js.html">polyfill/Math.js</a>, <a href="polyfill_Math.js.html#line125">line 125</a>
  459. </li></ul></dd>
  460. </dl>
  461. <h5>Returns:</h5>
  462. <div class="param-desc">
  463. <p>The base 2 logarithm of _x.</p>
  464. </div>
  465. <dl>
  466. <dt>
  467. Type
  468. </dt>
  469. <dd>
  470. <span class="param-type">number</span>
  471. </dd>
  472. </dl>
  473. <h4 class="name" id=".log10"><span class="type-signature">(static) </span>log10<span class="signature">(_x)</span><span class="type-signature"> &rarr; {number}</span></h4>
  474. <div class="description">
  475. <p>The Math.log10() function returns the base 10 logarithm of a number.
  476. Note that this polyfill is subject to rounding errors.</p>
  477. </div>
  478. <h5>Parameters:</h5>
  479. <table class="params">
  480. <thead>
  481. <tr>
  482. <th>Name</th>
  483. <th>Type</th>
  484. <th class="last">Description</th>
  485. </tr>
  486. </thead>
  487. <tbody>
  488. <tr>
  489. <td class="name"><code>_x</code></td>
  490. <td class="type">
  491. <span class="param-type">number</span>
  492. </td>
  493. <td class="description last"><p>The value to get the base 10 logarithm of.</p></td>
  494. </tr>
  495. </tbody>
  496. </table>
  497. <dl class="details">
  498. <dt class="tag-source">Source:</dt>
  499. <dd class="tag-source"><ul class="dummy"><li>
  500. <a href="polyfill_Math.js.html">polyfill/Math.js</a>, <a href="polyfill_Math.js.html#line136">line 136</a>
  501. </li></ul></dd>
  502. </dl>
  503. <h5>Returns:</h5>
  504. <div class="param-desc">
  505. <p>The base 10 logarithm of _x.</p>
  506. </div>
  507. <dl>
  508. <dt>
  509. Type
  510. </dt>
  511. <dd>
  512. <span class="param-type">number</span>
  513. </dd>
  514. </dl>
  515. <h4 class="name" id=".sign"><span class="type-signature">(static) </span>sign<span class="signature">(_x)</span><span class="type-signature"> &rarr; {number}</span></h4>
  516. <div class="description">
  517. <p>The Math.sign() function returns the sign of a number, indicating whether the number is positive, negative or zero.</p>
  518. </div>
  519. <h5>Parameters:</h5>
  520. <table class="params">
  521. <thead>
  522. <tr>
  523. <th>Name</th>
  524. <th>Type</th>
  525. <th class="last">Description</th>
  526. </tr>
  527. </thead>
  528. <tbody>
  529. <tr>
  530. <td class="name"><code>_x</code></td>
  531. <td class="type">
  532. <span class="param-type">number</span>
  533. </td>
  534. <td class="description last"><p>The number to check</p></td>
  535. </tr>
  536. </tbody>
  537. </table>
  538. <dl class="details">
  539. <dt class="tag-source">Source:</dt>
  540. <dd class="tag-source"><ul class="dummy"><li>
  541. <a href="polyfill_Math.js.html">polyfill/Math.js</a>, <a href="polyfill_Math.js.html#line219">line 219</a>
  542. </li></ul></dd>
  543. </dl>
  544. <h5>Returns:</h5>
  545. <div class="param-desc">
  546. <p>This function has 5 kinds of return values, 1, -1, 0, -0, NaN, which represent
  547. &quot;positive number&quot;, &quot;negative number&quot;, &quot;positive zero&quot;, &quot;negative zero&quot; and NaN respectively.</p>
  548. </div>
  549. <dl>
  550. <dt>
  551. Type
  552. </dt>
  553. <dd>
  554. <span class="param-type">number</span>
  555. </dd>
  556. </dl>
  557. <h4 class="name" id=".sinh"><span class="type-signature">(static) </span>sinh<span class="signature">(_x)</span><span class="type-signature"> &rarr; {number}</span></h4>
  558. <div class="description">
  559. <p>The Math.sinh() function returns the hyperbolic sine of a number.</p>
  560. </div>
  561. <h5>Parameters:</h5>
  562. <table class="params">
  563. <thead>
  564. <tr>
  565. <th>Name</th>
  566. <th>Type</th>
  567. <th class="last">Description</th>
  568. </tr>
  569. </thead>
  570. <tbody>
  571. <tr>
  572. <td class="name"><code>_x</code></td>
  573. <td class="type">
  574. <span class="param-type">number</span>
  575. </td>
  576. <td class="description last"><p>The value to calculate the sine of.</p></td>
  577. </tr>
  578. </tbody>
  579. </table>
  580. <dl class="details">
  581. <dt class="tag-source">Source:</dt>
  582. <dd class="tag-source"><ul class="dummy"><li>
  583. <a href="polyfill_Math.js.html">polyfill/Math.js</a>, <a href="polyfill_Math.js.html#line167">line 167</a>
  584. </li></ul></dd>
  585. </dl>
  586. <h5>Returns:</h5>
  587. <div class="param-desc">
  588. <p>The hyperbolic sine.</p>
  589. </div>
  590. <dl>
  591. <dt>
  592. Type
  593. </dt>
  594. <dd>
  595. <span class="param-type">number</span>
  596. </dd>
  597. </dl>
  598. <h4 class="name" id=".tanh"><span class="type-signature">(static) </span>tanh<span class="signature">(_x)</span><span class="type-signature"> &rarr; {number}</span></h4>
  599. <div class="description">
  600. <p>The Math.tanh() function returns the hyperbolic tangent of a number.</p>
  601. </div>
  602. <h5>Parameters:</h5>
  603. <table class="params">
  604. <thead>
  605. <tr>
  606. <th>Name</th>
  607. <th>Type</th>
  608. <th class="last">Description</th>
  609. </tr>
  610. </thead>
  611. <tbody>
  612. <tr>
  613. <td class="name"><code>_x</code></td>
  614. <td class="type">
  615. <span class="param-type">number</span>
  616. </td>
  617. <td class="description last"><p>The value to calculate the tangent of.</p></td>
  618. </tr>
  619. </tbody>
  620. </table>
  621. <dl class="details">
  622. <dt class="tag-source">Source:</dt>
  623. <dd class="tag-source"><ul class="dummy"><li>
  624. <a href="polyfill_Math.js.html">polyfill/Math.js</a>, <a href="polyfill_Math.js.html#line191">line 191</a>
  625. </li></ul></dd>
  626. </dl>
  627. <h5>Returns:</h5>
  628. <div class="param-desc">
  629. <p>The hyperbolic tangent.</p>
  630. </div>
  631. <dl>
  632. <dt>
  633. Type
  634. </dt>
  635. <dd>
  636. <span class="param-type">number</span>
  637. </dd>
  638. </dl>
  639. <h4 class="name" id=".trunc"><span class="type-signature">(static) </span>trunc<span class="signature">(_x)</span><span class="type-signature"> &rarr; {number}</span></h4>
  640. <div class="description">
  641. <p>Unlike other three Math methods: Math.floor(), Math.ceil() and Math.round(), the way
  642. Math.trunc() works is very simple and straightforward, just truncate the dot and the digits
  643. behind it, no matter whether the argument is a positive number or a negative number.</p>
  644. </div>
  645. <h5>Parameters:</h5>
  646. <table class="params">
  647. <thead>
  648. <tr>
  649. <th>Name</th>
  650. <th>Type</th>
  651. <th class="last">Description</th>
  652. </tr>
  653. </thead>
  654. <tbody>
  655. <tr>
  656. <td class="name"><code>_x</code></td>
  657. <td class="type">
  658. <span class="param-type">number</span>
  659. </td>
  660. <td class="description last"><p>The number to truncate.</p></td>
  661. </tr>
  662. </tbody>
  663. </table>
  664. <dl class="details">
  665. <dt class="tag-source">Source:</dt>
  666. <dd class="tag-source"><ul class="dummy"><li>
  667. <a href="polyfill_Math.js.html">polyfill/Math.js</a>, <a href="polyfill_Math.js.html#line234">line 234</a>
  668. </li></ul></dd>
  669. </dl>
  670. <h5>Returns:</h5>
  671. <div class="param-desc">
  672. <p>The truncated number</p>
  673. </div>
  674. <dl>
  675. <dt>
  676. Type
  677. </dt>
  678. <dd>
  679. <span class="param-type">number</span>
  680. </dd>
  681. </dl>
  682. </article>
  683. </section>
  684. </div>
  685. <nav>
  686. <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-barejs.html">barejs</a></li><li><a href="module-barejs_polyfill.html">barejs/polyfill</a></li><li><a href="module-barejs_polyfill_Intl.html">barejs/polyfill/Intl</a></li></ul><h3>Classes</h3><ul><li><a href="module-barejs.decl.html">decl</a></li><li><a href="module-barejs.decl-Enum.html">Enum</a></li><li><a href="module-barejs.decl-Interface.html">Interface</a></li><li><a href="module-barejs.decl-SpecialType.html">SpecialType</a></li><li><a href="module-barejs.Destroyable.html">Destroyable</a></li><li><a href="module-barejs.EventArgs.html">EventArgs</a></li><li><a href="module-barejs.Evented.html">Evented</a></li><li><a href="module-barejs.Evented-EventedHandle.html">EventedHandle</a></li><li><a href="module-barejs.Exception.html">Exception</a></li><li><a href="module-barejs_polyfill.Array.html">Array</a></li><li><a href="module-barejs_polyfill.Date.html">Date</a></li><li><a href="module-barejs_polyfill.EntryStore.html">EntryStore</a></li><li><a href="module-barejs_polyfill.EntryStore.Iterator.html">Iterator</a></li><li><a href="module-barejs_polyfill.Function.html">Function</a></li><li><a href="module-barejs_polyfill.Map.html">Map</a></li><li><a href="module-barejs_polyfill.Map-MapIterator.html">MapIterator</a></li><li><a href="module-barejs_polyfill.Math.html">Math</a></li><li><a href="module-barejs_polyfill.Number.html">Number</a></li><li><a href="module-barejs_polyfill.Object.html">Object</a></li><li><a href="module-barejs_polyfill.Promise.html">Promise</a></li><li><a href="module-barejs_polyfill.Set.html">Set</a></li><li><a href="module-barejs_polyfill.Set-SetIterator.html">SetIterator</a></li><li><a href="module-barejs_polyfill.String.html">String</a></li><li><a href="module-barejs_polyfill.Symbol.html">Symbol</a></li><li><a href="module-barejs_polyfill.WeakMap.html">WeakMap</a></li><li><a href="module-barejs_polyfill.WeakSet.html">WeakSet</a></li><li><a href="module-barejs_polyfill_Intl.DateTimeFormat.html">DateTimeFormat</a></li><li><a href="module-barejs_polyfill_Intl.DateTimeFormat-DateTimeFormatOptions.html">DateTimeFormatOptions</a></li><li><a href="module-barejs_polyfill_Intl.NumberFormat.html">NumberFormat</a></li><li><a href="module-barejs_polyfill_Intl.NumberFormat-NumberFormatOptions.html">NumberFormatOptions</a></li><li><a href="module-barejs_polyfill_Intl-Format.html">Format</a></li></ul>
  687. </nav>
  688. <br class="clear">
  689. <footer>
  690. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Oct 03 2018 15:59:34 GMT+0200 (W. Europe Daylight Time)
  691. </footer>
  692. <script> prettyPrint(); </script>
  693. <script src="scripts/linenumber.js"> </script>
  694. </body>
  695. </html>