-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Extract gmath_nodes from gcore::ops, create mods debug and extract_xy
#2764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
4c4f210 to
2d5894f
Compare
b113ef2 to
bffd562
Compare
2d5894f to
55e09b7
Compare
gmath_nodes from gcore::ops, create mods debug and extract_xy
55e09b7 to
5eaa7d9
Compare
20c7be5 to
bb01fd9
Compare
5eaa7d9 to
4d4977e
Compare
| /// The logical or operation (||) returns true if either of the two inputs are true, or false if both are false. | ||
| #[node_macro::node(category("Math: Logic"))] | ||
| fn logical_or(_: impl Ctx, value: bool, other_value: bool) -> bool { | ||
| value || other_value | ||
| } | ||
|
|
||
| /// The logical and operation (&&) returns true if both of the two inputs are true, or false if any are false. | ||
| #[node_macro::node(category("Math: Logic"))] | ||
| fn logical_and(_: impl Ctx, value: bool, other_value: bool) -> bool { | ||
| value && other_value | ||
| } | ||
|
|
||
| /// The logical not operation (!) reverses true and false value of the input. | ||
| #[node_macro::node(category("Math: Logic"))] | ||
| fn logical_not(_: impl Ctx, input: bool) -> bool { | ||
| !input | ||
| } | ||
|
|
||
| /// Constructs a bool value which may be set to true or false. | ||
| #[node_macro::node(category("Value"))] | ||
| fn bool_value(_: impl Ctx, _primary: (), #[name("Bool")] bool_value: bool) -> bool { | ||
| bool_value | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if it would make more sense to move these to the logic mod now that the mod is no longer called ops
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can split up the lib into smaller mods, though I'd create a new logic op and not put it into the old, since the old is almost exclusively string manipulation except for SwitchNode (which I may move here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, just wanted to make you aware of this, we can always move things later once we are a bit more settled into the new structure
4d4977e to
f3629ab
Compare
Requires #2760
Split out from #2746 (comment)