glam_det 2.0.0

A simple and fast 3D math library for games and graphics.
Documentation
// Copyright (C) 2020-2025 glam-det authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

mod affine2x4;
mod affine3x4;
mod isometry3x4;
mod mat2x4;
mod mat3x4;
mod mat4x4;
mod point2x4;
mod point3x4;
mod point4x4;
mod quatx4;
mod unit_quatx4;
mod unit_vec2x4;
mod unit_vec3x4;
mod unit_vec4x4;
mod vec2x4;
mod vec3x4;
mod vec4x4;

pub use vec2x4::{vec2x4, Vec2x4};
pub use vec3x4::{vec3x4, Vec3x4};
pub use vec4x4::{vec4x4, Vec4x4};

pub use unit_vec2x4::UnitVec2x4;
pub use unit_vec3x4::UnitVec3x4;
pub use unit_vec4x4::UnitVec4x4;

pub use point2x4::{point2x4, Point2x4};
pub use point3x4::{point3x4, Point3x4};
pub use point4x4::{point4x4, Point4x4};

pub use quatx4::{quatx4, Quatx4};
pub use unit_quatx4::UnitQuatx4;

pub use mat2x4::{mat2x4, Mat2x4};
pub use mat3x4::{mat3x4, Mat3x4};
pub use mat4x4::{mat4x4, Mat4x4};

pub use affine2x4::Affine2x4;
pub use affine3x4::Affine3x4;

pub use isometry3x4::Isometry3x4;

macro_rules! assert_soa_align_size {
    ($type: ident, $size: expr) => {
        const_assert_eq!(16, core::mem::align_of::<super::$type>());
        const_assert_eq!(16 * $size, core::mem::size_of::<super::$type>());
    };
}

mod const_test_soax4_types {
    assert_soa_align_size!(Affine2x4, 6);
    assert_soa_align_size!(Affine3x4, 12);
    assert_soa_align_size!(Isometry3x4, 7);
    assert_soa_align_size!(Mat2x4, 4);
    assert_soa_align_size!(Mat3x4, 9);
    assert_soa_align_size!(Mat4x4, 16);
    assert_soa_align_size!(Point2x4, 2);
    assert_soa_align_size!(Point3x4, 3);
    assert_soa_align_size!(Point4x4, 4);
    assert_soa_align_size!(Quatx4, 4);
    assert_soa_align_size!(UnitQuatx4, 4);
    assert_soa_align_size!(UnitVec2x4, 2);
    assert_soa_align_size!(UnitVec3x4, 3);
    assert_soa_align_size!(UnitVec4x4, 4);
    assert_soa_align_size!(Vec2x4, 2);
    assert_soa_align_size!(Vec3x4, 3);
    assert_soa_align_size!(Vec4x4, 4);
}