
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
JJ.Framework.Mathematics
Advanced tools
Interpolator Smooth Bezier Cubic Hermite TextPlotter NumberBases ToBase FromBase ToHex FromHex ToLetterSequence FromLetterSequence Randomizer GetRandomItem GetInt32 GetDouble GetSingle IsInRectangle GetCenter AbsoluteDistance IsPowerOf2 LogRatio RoundToSignificantDigits RoundWithStep ScaleLinearly SpeadItems SpreadIntegers SpreadDoubles. Integer variation of Pow and Log.
Helpers for calculations.
Random
class more easilyPlot function output in text mode. Example call:
IList<string> plot = TextPlotter.Plot(
new[] { 0.0, 0.7, 1.0, 0.7, 0.0, -0.7, -1.0, -0.7, 0.0 },
columnCount: 5,
lineCount: 7);
Example output:
āāāāāāā ā ā ā ā ā āāāāāāāāāāāāāāāāāāāāāāā
āāāāā ā āāāāāāā ā āāāāāāāāāāāāāāāāāāāāā
āāāā āāāāāāāāāāā āāāāāāāāāāāāāāāāāāāā
āā ā āāāāāāāāāāāāā ā āāāāāāāāāāāāāāāāāā
ā āāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāā ā āāāāāāāāāāāāā ā ā
āāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāā āāā
āāāāāāāāāāāāāāāāāāāāāā ā āāāāāāā ā āāāā
āāāāāāāāāāāāāāāāāāāāāāāā ā ā ā ā ā āāāāāā
(There is also a variation that takes x and y coordinates.)
For (sound) curves.
Hermite4pt3oX
:
CubicFromT
CubicSmoothSlope
There are also separate methods for precalculating values once when you start interpolating between two numbers and then doing a faster calculation to derive the points in between.
ToBase
int
to an n-base number in usually string format.FromBase
int
. The input is usually in string format.FromBase
and then ToBase
.FromHex
/ ToHex
ToLetterSequence
/ FromLetterSequence
GetRandomItem
Return a random number out of a range:
GetInt32
GetDouble
GetSingle
IsInRectangle
GetCenter
AbsoluteDistance
Misc math helpers.
Pow
with integersLog
with integers
IsPowerOf2
LogRatio
RoundToSignificantDigits
RoundWithStep
Math.Round
as a helper, which supports a wide range of values.RoundWithStepWithInt64Bounds
Int64
as a helper, which might be faster than Math.Round
, but means you are stuck within the value bounds of long
.ScaleLinearly
SpeadItems
SpreadIntegers
SpreadDoubles
startValue
, endValue
and pointCount
and returns a double[]
.FAQs
Interpolator Smooth Bezier Cubic Hermite TextPlotter NumberBases ToBase FromBase ToHex FromHex ToLetterSequence FromLetterSequence Randomizer GetRandomItem GetInt32 GetDouble GetSingle IsInRectangle GetCenter AbsoluteDistance IsPowerOf2 LogRatio RoundToSignificantDigits RoundWithStep ScaleLinearly SpeadItems SpreadIntegers SpreadDoubles. Integer variation of Pow and Log.
We found that jj.framework.mathematics demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Ā It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.