Skip to content

Commit

Permalink
fix: Feature-gate bytemuck in mat3
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-harding committed Jan 16, 2025
1 parent 19b314c commit 701ef9d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions neophyte-linalg/src/mat3.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use super::vec2::Vec2;
use bytemuck::{Pod, Zeroable};
use std::ops::{Add, Mul};

/// A 3x3 matrix type
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Default, Pod, Zeroable)]
#[derive(Debug, Clone, Copy, PartialEq, Default)]
#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
pub struct Mat3 {
// Columns
x: Vec3,
Expand Down Expand Up @@ -79,7 +79,8 @@ impl Mul for Mat3 {
// Align is useful to make sure padding is handled correctly in push constant
// structs
#[repr(C, align(16))]
#[derive(Debug, Clone, Copy, PartialEq, Default, Pod, Zeroable)]
#[derive(Debug, Clone, Copy, PartialEq, Default)]
#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
pub struct Vec3 {
x: f32,
y: f32,
Expand Down

0 comments on commit 701ef9d

Please sign in to comment.