From 5bb4491e0f475bd17668c73dac68b4ce86b311d4 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 10 Sep 2024 13:46:24 -0700 Subject: [PATCH] ops rewrite --- Cargo.lock | 19 ++++++++++--------- Cargo.toml | 4 ++-- src/integer.rs | 6 +++--- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d178db9..c5d2c40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,14 +27,7 @@ dependencies = [ "arrayvec", "bnum", "paste", -] - -[[package]] -name = "fixed_wide_vectors" -version = "0.1.0" -dependencies = [ - "fixed_wide", - "paste", + "ratio_ops", ] [[package]] @@ -54,6 +47,10 @@ dependencies = [ "syn", ] +[[package]] +name = "linear_ops" +version = "0.1.0" + [[package]] name = "paste" version = "1.0.15" @@ -78,6 +75,10 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "ratio_ops" +version = "0.1.0" + [[package]] name = "strafesnet_common" version = "0.4.1" @@ -85,9 +86,9 @@ dependencies = [ "arrayvec", "bitflags", "fixed_wide", - "fixed_wide_vectors", "glam", "id", + "linear_ops", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 56956ab..2ef36a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ authors = ["Rhys Lloyd "] [dependencies] arrayvec = "0.7.4" bitflags = "2.6.0" -fixed_wide = { path = "../fixed_wide_vectors/fixed_wide" } -fixed_wide_vectors = { path = "../fixed_wide_vectors/fixed_wide_vectors" } +fixed_wide = { path = "../fixed_wide_vectors/fixed_wide", features = ["deferred-division","zeroes","wide-mul"] } +linear_ops = { path = "../fixed_wide_vectors/linear_ops" } glam = "0.28.0" id = { version = "0.1.0", registry = "strafesnet" } diff --git a/src/integer.rs b/src/integer.rs index 518e0dc..d227deb 100644 --- a/src/integer.rs +++ b/src/integer.rs @@ -428,9 +428,9 @@ impl TryFrom<[f32;3]> for Unit32Vec3{ */ pub type Planar64=fixed_wide::types::I32F32; -pub type Planar64Vec3=fixed_wide_vectors::types::Vector3; -pub type Planar64Mat3=fixed_wide_vectors::types::Matrix3; -pub type Planar64Affine3=fixed_wide_vectors::types::Matrix4x3; +pub type Planar64Vec3=linear_ops::types::Vector3; +pub type Planar64Mat3=linear_ops::types::Matrix3; +pub type Planar64Affine3=linear_ops::types::Matrix4x3; #[test] fn test_sqrt(){