Skip to main content

Linflex

A linear algebra package written in Python

Installation

Install using your preferred Python package manager:

uv add linflex
pip install linflex

Getting started

from linflex import Vec2

a = Vec2(3, 4)
b = Vec2(2, -1)

assert a + b == Vec2(5, 3)
assert a - b == Vec2(1, 5)
assert a.length() == 5
assert -Vec2(2, -3) == Vec2(-2, 3)

c = Vec2(1, 1)
c += Vec2(0, 1)
assert c == Vec2(1, 2)

x, y = Vec2(3, 4)  # Supports tuple destructuring
assert x == 3 and y == 4

Rational

linflex was created to fill the need for a common Vec2 class accross my projects and packages. It is lightweight, as it only depends on typing-extensions. Aside from linear algebra, I also needed helper functions like lerp, sign and clamp, which was put into good use by <Vec2>.lerp, and alike. Naming and functionality is mainly inspired by the Godot Game Engine.

Includes

  • Functions
    • lerp
    • sign
    • clamp
    • move_toward
  • Datastructures
    • Vec2
    • Vec2i
    • Vec3

Versioning

linflex uses SemVer, according to The Cargo Book.

License

MIT

Metadata

Release files for linflex 0.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for linflex 0.3.4
File Size Uploaded Provenance Actions
linflex-0.3.4.tar.gz 9.9 kB Without provenance Details for linflex-0.3.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for linflex 0.3.4
File Interpreter ABI Platform Actions
linflex-0.3.4-py3-none-any.whl Python 3 none any Details for linflex-0.3.4-py3-none-any.whl

Total release size: 24.0 kB

Release files / linflex-0.3.4.tar.gz

Download URL linflex-0.3.4.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
adb6f17ed99b8ff58ea2be7a8138b093df7427f1fa96500fef251f7f21f81e1e
BLAKE2b-256 checksum
How to use checksums
832ea65f39d362008b02636f4549c390b0efe31063d04c867cab19d47ac57639
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / linflex-0.3.4-py3-none-any.whl

Download URL linflex-0.3.4-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9cbacb9d9630fd12438b5c63f89048aa5e533c7e2e31172edd9f764b557a942
BLAKE2b-256 checksum
How to use checksums
c729e46c67e5c7033fe58fb31b6af8db05f4ff4cae1aebea05d38364c34be649
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for linflex 0.3.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page