There isn’t that much precision in f32...

This commit is contained in:
numzero 2024-11-07 00:39:42 +03:00
parent cc39a249b7
commit 64d53cf72b

View File

@ -15,7 +15,7 @@ pub trait Metric {
}
fn part_derivs_at(&self, pos: Vec3) -> Tens3 {
part_deriv(|p| self.at(p), pos, 1.0 / 1024.0) // division by such eps is exact which is good for overall precision
part_deriv(|p| self.at(p), pos, 1.0 / 64.0) // there just isnt enough precision for a small ε.
}
fn vec_length_at(&self, at: Vec3, v: Vec3) -> f32 {