0.0.6 • Published 1 year ago
@ignhycord/math v0.0.6
@ignhycord/math
This package holds a number of math-related utilities for my projects.
Utilites
basic
Basic math functions such as min, max, and other statistical helpersconstants
Basic constant values such as defining EPSILON or DEGREEVector2D
Class which wraps a collection of helper functions to make working with 2D vectors nicer- Geometry:
Point
Basic point class which is similar to a 2d vectorSegment
Helper class to wrap two pointsPolygon
Helper class to wrap multiple points and segments.
Geomoetric functions also have corrosponding functions to render them within the @ignhycord/image
's Viewport class if you would like to display the geometric classes. Every geometric class has a corrosponding function to draw it so you can draw advanced shapes with them while also having a rigid data structure instead of arbitrary circles and lines in a canvas.