New nodes: 'Sign', 'Distance', 'Cross Product', and 'Lerp' (#4361)

This commit is contained in:
Keavon Chambers
2026-07-22 22:03:50 -07:00
committed by Dennis Kobert
parent 6386928552
commit 3336883568
4 changed files with 185 additions and 35 deletions

View File

@@ -5,7 +5,7 @@ use glam::{DVec2, IVec2, UVec2};
/// Obtains the X or Y component of a vec2.
///
/// The inverse of this node is **Combine Vec2**, which composes a vec2 from its X and Y components.
#[node_macro::node(name("Extract XY"), category("Math: Vector"))]
#[node_macro::node(name("Extract XY"), category("Math: Vec2"))]
fn extract_xy<T: Into<DVec2>>(_: impl Ctx, #[implementations(DVec2, IVec2, UVec2)] vector: T, axis: XY) -> f64 {
match axis {
XY::X => vector.into().x,