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

nearest-periodic-value

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nearest-periodic-value

Find the nearest value of a discrete periodic function, given a point.

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

nearest-periodic-value.js

Travis build status Code Climate Test Coverage Dependency Status devDependency Status

Find the nearest value of a discrete periodic function, given a point.

What are discrete periodic functions?

Periodic functions are functions that repeat. Discrete functions are functions whose values do not connect. An example of a discrete periodic function is the function of "Wednesdays" on a calendar. Wednesdays are discrete values along a timeline, and they repeat every 7 days.

Terminology

The members of a periodic function's output are the "values." A single member is a "value."

The interval that the function repeats along is the "period."

A "point" is any value in the domain of the function.

API

nearestPeriodicValue(point, value, period)

Find the nearest value to point. Supply a value from the codomain of the function, and its period.

FAQ

What if my point is equidistant between two values?

The value in front of your point will be chosen.

Keywords

FAQs

Package last updated on 03 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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