Update name of struct field

This commit is contained in:
Hanno Braun 2024-11-06 19:10:35 +01:00
parent 3c7a2317c1
commit 1da2844030

View File

@ -2,15 +2,15 @@ pub type Point = [Scalar; 3];
#[derive(Clone, Copy)]
pub struct Scalar {
inner: f64,
value: f64,
}
impl Scalar {
pub fn new(value: f64) -> Self {
Self { inner: value }
Self { value }
}
pub fn value(&self) -> f64 {
self.inner
self.value
}
}