Skip to content

asilinwei/math

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

math

This is a repository about math APIs.

2018-10-22
LinWei

Achieve some math APIs.
See Math.

Note:
No support to Internet Explorer.

APIs:

Math._pow

Description:
Return the base to the exponent power.

source
See Math.pow

Example:

Math._pow(2, 3)
// => 8

Math._pow(4, 0.5)
// => 2

Math._sqrt

Description:
Return the square root of a number.

source
See Math.sqrt

Example:

Math._sqrt(16)
// => 4

Math._sqrt('0x10')
// => 4

Math._sqrt(-1)
// => NaN

Math._toHex

Description:
Convert a number to hexadecimal sequence.

source

Example:

Math._toHex(64)
// => '40'

Math._toHex(NaN)
// => '0'

About

This is a repository about math API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published