unlerp

WebJar for unlerp

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

unlerp
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

unlerp
WebJar for unlerp
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/mattdesl/unlerp

Download unlerp

How to add to project

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

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.

browser support

unlerp

frozen

Opposite of lerp; gets the range between a lower and upper bound.

var range = require('unlerp')

//result is typically between 0.0 and 1.0
var result = range(0, 50, 25) //=> 0.5

//if you want to saturate to 0.0 - 1.0
result = require('clamp')(result, 0, 1)

The result is not clamped.

Usage

NPM

range(min, max, value)

Produces the normalized range of value between two bounds. Equivalent to:

(value - min) / (max - min)

License

MIT, see LICENSE.md for details.

Versions

Version
1.0.1