1.0.1 • Published 8 years ago

sqr v1.0.1

Weekly downloads
3
License
BSD-3-Clause
Repository
github
Last release
8 years ago

Build Status

sqr

Peasy easy math square function. Returns the product of a number multiplied by itself.

API

var sqr = require('sqr');

sqr(x)

Returns the square of number x.

sqr.isSquare(x)

Returns true if x is a square number, i.e. an integer which can be obtained by squaring another integer, false otherwise.

sqr.nearest(x)

Returns the nearest integer to x which is a square number.

License

BSD 3-Clause

Copyright (c) Claudio Procida 2015