npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

hisabati

v0.1.0

Published

Hisabati is a modular math library for 2D and 3D calculations. It provides vector, matrix, transform, rotation, basis, helper, and constant utilities for spatial work in games, graphics, and simulations.

Readme

Hisabati

Hisabati is a modular math library for 2D and 3D calculations. It provides vector, matrix, transform, rotation, basis, helper, and constant utilities for spatial work in games, graphics, and simulations.

Import only the parts you need.

Features

  • Vectors

    • 2D, 3D, and 4D vector types
    • Boolean direction vectors for compact axis state
    • Component-wise arithmetic, magnitude, distance, and normalization
    • Dot and cross products, reflection, inversion, and interpolation
    • Direction helpers for axis-aligned and angle-derived vectors
  • Matrices

    • 2x2, 3x3, and 4x4 matrix types
    • Identity and zero matrices
    • Transpose, determinant, trace, multiplication, division, and inversion
    • Component-wise arithmetic and equality checks
    • Rotation matrix support for 2D and 3D workflows
  • Affines

    • 2D and 3D affine transform types
    • Compose and decompose translation, rotation, and scale
    • Translate, rotate, scale, invert, multiply, and divide transforms
    • Look-at transforms for 2D and 3D targets
    • Transform vectors and convert 3D affines to 4x4 matrices
  • Angles and Rotations

    • Scalar angle wrappers for direct numeric storage
    • 2D rotary values based on cosine and sine
    • 3D quaternion rotation values
    • Build rotations from angles, Euler values, matrices, and axis-angle inputs
    • Compare, normalize, interpolate, and transform with rotations
  • Bases

    • 2D and 3D basis frames
    • Store the primary axes for orientation tracking
    • Useful for representing right, up, forward, and related directional frames
  • Standalone Math Helpers

    • Clamp and step helpers for numeric ranges
    • Linear interpolation, inverse interpolation, and remapping
    • Smooth-step easing functions
    • Index-to-coordinate mapping in 2D and 3D
    • General math helpers for power, square root, rounding, wrapping, and inversion
    • Pairing helpers and approximate equality checks
    • Random number helpers
  • Constants

    • Standard math constants and conversion factors
    • Pi, tau, half-pi, quarter-pi, degree-radian conversion, and related values

Usage

TODO: Make the guide to using this.

API References

TODO: Link to the docs

Design Principles

  • Explicit primitives: small, well-defined numeric types instead of implicit state
  • Composable operations: vectors, matrices, rotations, and transforms interoperate cleanly
  • Predictable behavior: direct mathematical semantics with optional in-place variants
  • Spatial correctness: APIs align with standard 2D/3D coordinate system expectations

Examples

TODO: Actually add real use cases

Contributing

TODO: Create a contribution guide and a CLA

Notes

  • All angles are in radians
  • The library uses a right-handed coordinate system
  • Matrix and affine layouts follow the component ordering documented in the source
  • The library follows standard units where applicable