mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 07:18:04 +08:00
New nodes: 'Sign', 'Distance', 'Cross Product', and 'Lerp' (#4361)
This commit is contained in:
committed by
Dennis Kobert
parent
6386928552
commit
3336883568
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user