windows-numerics (0.100.0+paring.1)

Published 2026-10-14 03:21:30 +09:00 by paring

Installation

[registries.forgejo]
index = "sparse+" # Sparse index
# index = "" # Git

[net]
git-fetch-with-cli = true
cargo add windows-numerics@0.100.0+paring.1 --registry forgejo

About this package

Windows numeric types

windows-numerics

The windows-numerics crate provides Windows vector, matrix, plane, and quaternion types.

These are the same graphics math types used by composition, Direct2D, and Direct3D APIs, so values flow into those APIs without conversion.

Start by adding the following to your Cargo.toml file:

[dependencies.windows-numerics]
version = "0.100"

Use the vector and matrix types as needed:

use windows_numerics::*;

let a = Vector2::new(3.0, 4.0);
assert_eq!(a.length(), 5.0);

let b = Vector3::new(1.0, 0.0, 0.0);
let c = Vector3::new(0.0, 1.0, 0.0);
assert_eq!(b.cross(&c), Vector3::new(0.0, 0.0, 1.0));

let transform = Matrix3x2::translation(10.0, 20.0);
assert_eq!(transform.m31, 10.0);
assert_eq!(transform.m32, 20.0);

Dependencies

ID Version
windows-core ^0.100.0
Details
Cargo
2026-10-14 03:21:30 +09:00
20
2026-11-10 00:22:51 +09:00
MIT OR Apache-2.0
10 KiB
Assets (1)
Versions (1) View all
0.100.0+paring.1 2026-10-14