summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-14 14:58:57 -0500
committerpommicket <pommicket@gmail.com>2022-12-14 14:58:57 -0500
commite8bc993ed558e1b25a31e6a6fabac7853e1b1035 (patch)
treeaaec434df223e58e84c38799a6870e0902b17c6a /src
parent5a20cffba66caa71b495736f75031f69d09ba40b (diff)
GenRandom structs, scale, bias
Diffstat (limited to 'src')
-rw-r--r--src/main.rs9
-rw-r--r--src/sdf.rs6
2 files changed, 7 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs
index ab2aa40..d1afbce 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,7 +1,6 @@
/*
@TODO:
- use 0..(sum of probs) for variant
-- scale and bias
- fullscreen key
- mathematical analysis
- options for:
@@ -10,19 +9,19 @@
- AA quality
- # iterations, distance cutoff
- documentation
+- GenRandom integers (+ gen_random_scale_bias)
*/
-extern crate nalgebra;
extern crate gen_random;
+extern crate nalgebra;
pub mod sdf;
mod sdl;
pub mod win;
+use gen_random::GenRandom;
use nalgebra::{Matrix3, Matrix4, Rotation3, Vector3};
use std::time::Instant;
-use gen_random::GenRandom;
-
type Vec3 = Vector3<f32>;
type Mat3 = Matrix3<f32>;
@@ -70,7 +69,7 @@ fn try_main() -> Result<(), String> {
use sdf::{Constant, R3ToR, R3ToR3, RToR};
let _test = Constant::gen_thread_random();
println!("{_test:?}");
-
+
let funciton = R3ToR::compose(
R3ToR3::InfiniteMirrors(Constant::from(2.0)),
R3ToR::sphere_f32(0.2),
diff --git a/src/sdf.rs b/src/sdf.rs
index 61b070f..7456d25 100644
--- a/src/sdf.rs
+++ b/src/sdf.rs
@@ -1,10 +1,10 @@
#![allow(dead_code)] // @TODO @TEMPORARY
-extern crate rand;
extern crate gen_random_proc_macro;
+extern crate rand;
-use std::fmt::{self, Display, Formatter, Write};
-use gen_random_proc_macro::GenRandom;
use gen_random::GenRandom;
+use gen_random_proc_macro::GenRandom;
+use std::fmt::{self, Display, Formatter, Write};
// we're only writing numbers and strings so write! should never fail.
macro_rules! write_str {