From a337a52c1ef307d6bf8d310c26bd44458c699da7 Mon Sep 17 00:00:00 2001 From: celyk Date: Sun, 6 Jul 2025 18:52:18 +1000 Subject: [PATCH] Add normalize node --- node-graph/gmath-nodes/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/node-graph/gmath-nodes/src/lib.rs b/node-graph/gmath-nodes/src/lib.rs index fe9812afb..b4d76432c 100644 --- a/node-graph/gmath-nodes/src/lib.rs +++ b/node-graph/gmath-nodes/src/lib.rs @@ -617,6 +617,11 @@ fn length(_: impl Ctx, vector: DVec2) -> f64 { vector.length() } +#[node_macro::node(category("Math: Vector"))] +fn normalize(_: impl Ctx, vector: DVec2) -> DVec2 { + vector.normalize() +} + #[cfg(test)] mod test { use super::*;