Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
nobuyuki83 committed Dec 30, 2024
1 parent 721eb2d commit 3022405
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 2 additions & 3 deletions del-geo-core/src/mat2x3_col_major.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ where
]
}


pub fn mult_transpose_vec3(a: &[f32;6], v: &[f32]) -> [f32;3] {
pub fn mult_transpose_vec3(a: &[f32; 6], v: &[f32]) -> [f32; 3] {
[
a[0] * v[0] + a[1] * v[1],
a[2] * v[0] + a[3] * v[1],
a[4] * v[0] + a[5] * v[1]
a[4] * v[0] + a[5] * v[1],
]
}

Expand Down
8 changes: 5 additions & 3 deletions del-geo-core/src/vec3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ where

impl<Real> Vec3<Real> for [Real; 3]
where
Real: num_traits::Float + std::ops::MulAssign
Real: num_traits::Float + std::ops::MulAssign,
{
fn normalize(&self) -> Self {
normalize(self)
Expand All @@ -42,7 +42,9 @@ where
fn add(&self, other: &Self) -> Self {
add(self, other)
}
fn add_in_place(&mut self, other: &Self){ add_in_place (self, other); }
fn add_in_place(&mut self, other: &Self) {
add_in_place(self, other);
}
fn dot(&self, other: &Self) -> Real {
dot(self, other)
}
Expand Down Expand Up @@ -183,7 +185,7 @@ where

pub fn add_in_place<T>(a: &mut [T; 3], b: &[T; 3])
where
T: num_traits::Float
T: num_traits::Float,
{
a[0] = a[0] + b[0];
a[1] = a[1] + b[1];
Expand Down

0 comments on commit 3022405

Please sign in to comment.