Improve the naming of the normalization methods
All checks were successful
/ test (pull_request) Successful in 2m26s

This commit is contained in:
Aaron Fenyes 2025-06-01 10:49:50 -07:00
parent 8732cb77c2
commit 54b34e0582
2 changed files with 14 additions and 13 deletions

View file

@ -35,9 +35,9 @@ pub fn sphere_with_offset(dir_x: f64, dir_y: f64, dir_z: f64, off: f64, curv: f6
])
}
// normalize a sphere's representation vector by contracting toward the last
// coordinate axis
pub fn normalize_mut_sphere(rep: &mut DVector<f64>) {
// project a sphere's representation vector to the normalization variety by
// contracting toward the last coordinate axis
pub fn project_sphere_to_normalized(rep: &mut DVector<f64>) {
let q_sp = rep.fixed_rows::<3>(0).norm_squared();
let half_q_lt = -2.0 * rep[3] * rep[4];
let half_q_lt_sq = half_q_lt * half_q_lt;
@ -46,7 +46,7 @@ pub fn normalize_mut_sphere(rep: &mut DVector<f64>) {
}
// normalize a point's representation vector by scaling
pub fn normalize_mut_point(rep: &mut DVector<f64>) {
pub fn project_point_to_normalized(rep: &mut DVector<f64>) {
rep.scale_mut(0.5 / rep[3]);
}