mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-07 19:38:29 +00:00
Prepare for making Scalar
NaN-safe
This commit is contained in:
parent
babe357f11
commit
378047b79a
@ -14,7 +14,7 @@ pub fn export(mesh: &Mesh) -> anyhow::Result<()> {
|
||||
vertex: mesh_vertices
|
||||
.into_iter()
|
||||
.map(|Vertex { point }| point)
|
||||
.map(|point| point.map(|coord| coord.inner))
|
||||
.map(|point| point.map(|coord| coord.value()))
|
||||
.map(|[x, y, z]| threemf::model::Vertex { x, y, z })
|
||||
.collect(),
|
||||
},
|
||||
|
@ -9,4 +9,8 @@ impl Scalar {
|
||||
pub fn new(value: f64) -> Self {
|
||||
Self { inner: value }
|
||||
}
|
||||
|
||||
pub fn value(&self) -> f64 {
|
||||
self.inner
|
||||
}
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ impl Renderer {
|
||||
.get(index as usize)
|
||||
.unwrap()
|
||||
.point
|
||||
.map(|coord| coord.inner as f32),
|
||||
.map(|coord| coord.value() as f32),
|
||||
)
|
||||
});
|
||||
let normal = {
|
||||
|
Loading…
Reference in New Issue
Block a user