Skip to content

claudiopro/sqr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Calculates the square of numbers, and checks if they're square numbers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published