math-clamp-x

WebJar for math-clamp-x

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

math-clamp-x
Последняя версия

Последняя версия

1.2.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

math-clamp-x
WebJar for math-clamp-x
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/Xotic750/math-clamp-x

Скачать math-clamp-x

Как подключить последнюю версию

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

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : to-number-x jar [2.0.0,3)

Модули Проекта

Данный проект не имеет модулей.

Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

math-clamp-x

Clamp a number to limits.

module.exports(value, [min], max)number

This method clamp a number to min and max limits inclusive.

Kind: Exported function
Returns: number - The clamped number.
Throws:

  • RangeError If min > max.
Param Type Default Description
value number The number to be clamped.
[min] number 0 The minimum number.
max number The maximum number.

Example

import mathClamp from 'math-clamp-x';

console.log(mathClamp(-5, 3, 3)); // 3
console.log(mathClamp(0, 3, 3)); // 3
console.log(mathClamp(5, 3, 3)); // 3

Версии библиотеки

Версия
1.2.0