-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
Currently the «Angle Between» node returns a value between 0 and π radians. This should be adjusted to be between -π and +π radians, going in an anticlockwise direction. This can be achieved with DVec2::angle_to function in glam.
Graphite/node-graph/nodes/math/src/lib.rs
Lines 828 to 831 in 5543afd
| fn angle_between(_: impl Ctx, vector_a: DVec2, vector_b: DVec2, radians: bool) -> f64 { | |
| let dot_product = vector_a.normalize_or_zero().dot(vector_b.normalize_or_zero()); | |
| let angle = dot_product.acos(); | |
| if radians { angle } else { angle.to_degrees() } |
Suggested by Paulchen in discord.
Metadata
Metadata
Assignees
Labels
No labels