mirror of
https://github.com/hannobraun/Fornjot
synced 2025-10-22 07:48:25 +00:00
Prepare for making Scalar
NaN-safe
This commit is contained in:
parent
c55bb57338
commit
babe357f11
@ -4,3 +4,9 @@ pub type Point = [Scalar; 3];
|
|||||||
pub struct Scalar {
|
pub struct Scalar {
|
||||||
pub inner: f64,
|
pub inner: f64,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Scalar {
|
||||||
|
pub fn new(value: f64) -> Self {
|
||||||
|
Self { inner: value }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -13,7 +13,7 @@ pub fn model() -> anyhow::Result<Mesh> {
|
|||||||
[-0.5, 0.5, 0.5], // 6
|
[-0.5, 0.5, 0.5], // 6
|
||||||
[0.5, 0.5, 0.5], // 7
|
[0.5, 0.5, 0.5], // 7
|
||||||
]
|
]
|
||||||
.map(|point| mesh.vertex(point.map(|coord| Scalar { inner: coord })));
|
.map(|point| mesh.vertex(point.map(Scalar::new)));
|
||||||
|
|
||||||
[
|
[
|
||||||
[0, 4, 6], // left
|
[0, 4, 6], // left
|
||||||
|
Loading…
x
Reference in New Issue
Block a user