signum

WebJar for signum

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

signum
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

signum
WebJar for signum
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/scijs/signum

Download signum

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/signum/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>signum</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/signum/
implementation 'org.webjars.npm:signum:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/signum/
implementation ("org.webjars.npm:signum:1.0.0")
'org.webjars.npm:signum:jar:1.0.0'
<dependency org="org.webjars.npm" name="signum" rev="1.0.0">
  <artifact name="signum" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='signum', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "signum" % "1.0.0"
[org.webjars.npm/signum "1.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

signum

Returns the sign of a floating point number

Example

var sgn = require("signum")

console.log(sgn(-0.00001))
console.log(sng(0))
console.log(sng(Infinity))

Output:

-1
0
1

Install

npm install signum

API

require("signum")(x)

Returns the sign of x

  • x is a number

Returns One of the following values

  • -1 if x<0
  • 1 if x>0
  • 0 otherwise

Credits

(c) 2014 Mikola Lysenko. MIT License

org.webjars.npm

Versions

Version
1.0.0
0.0.0