mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-07-07 15:55:00 +00:00
Add normalize node
This commit is contained in:
parent
3482c5b8a5
commit
a337a52c1e
1 changed files with 5 additions and 0 deletions
|
@ -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::*;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue