Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@thi.ng/math

Package Overview
Dependencies
Maintainers
1
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thi.ng/math - npm Package Compare versions

Comparing version 5.6.3 to 5.7.0

8

CHANGELOG.md
# Change Log
- **Last updated**: 2023-10-23T07:37:37Z
- **Last updated**: 2023-10-27T16:56:24Z
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)

@@ -12,2 +12,8 @@

## [5.7.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/math@5.7.0) (2023-10-27)
#### 🚀 Features
- add foldback01() ([1272647](https://github.com/thi-ng/umbrella/commit/1272647))
## [5.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/math@5.6.0) (2023-08-24)

@@ -14,0 +20,0 @@

@@ -138,2 +138,10 @@ import type { FnN, FnN2, FnN3, FnN4, FnU2, FnU3 } from "@thi.ng/api";

/**
* Similar to {@link foldback}, but with fixed target range: Folds `x` into the
* closed [0..1] interval, using infinite internal reflection on either side of
* the interval.
*
* @param x
*/
export declare const foldback01: FnN;
/**
* Returns true iff `x` is in closed interval `[min .. max]`

@@ -140,0 +148,0 @@ *

@@ -185,2 +185,10 @@ /**

/**
* Similar to {@link foldback}, but with fixed target range: Folds `x` into the
* closed [0..1] interval, using infinite internal reflection on either side of
* the interval.
*
* @param x
*/
export const foldback01 = (x) => ((x = Math.abs(x) % 2) > 1 ? 2 - x : x);
/**
* Returns true iff `x` is in closed interval `[min .. max]`

@@ -187,0 +195,0 @@ *

4

package.json
{
"name": "@thi.ng/math",
"version": "5.6.3",
"version": "5.7.0",
"description": "Assorted common math functions & utilities",

@@ -141,3 +141,3 @@ "type": "module",

},
"gitHead": "8d46d9326a9f9b81d65e7e274446f5964f9942ac\n"
"gitHead": "502e8fa937677ff7bc4fbd0906d8c8b4b0b471e5\n"
}

@@ -70,3 +70,3 @@ <!-- This file is generated - DO NOT EDIT! -->

Package sizes (brotli'd, pre-treeshake): ESM: 4.06 KB
Package sizes (brotli'd, pre-treeshake): ESM: 4.08 KB

@@ -87,2 +87,3 @@ ## Dependencies

|:-----------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------|:------------------------------------------------------------|:-----------------------------------------------------------------------------------------|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/boid-basics.png" width="240"/> | Basic 2D boid simulation and spatial indexing neighbor lookups | [Demo](https://demo.thi.ng/umbrella/boid-basics/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/boid-basics) |
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/crypto-chart.png" width="240"/> | Basic crypto-currency candle chart with multiple moving averages plots | [Demo](https://demo.thi.ng/umbrella/crypto-chart/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/crypto-chart) |

@@ -89,0 +90,0 @@ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/hdom-canvas-particles.jpg" width="240"/> | 2D Bezier curve-guided particle system | [Demo](https://demo.thi.ng/umbrella/hdom-canvas-particles/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/hdom-canvas-particles) |

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc