Update Files

This commit is contained in:
2025-01-22 16:18:30 +01:00
parent ed4603cf95
commit a36294b518
16718 changed files with 2960346 additions and 0 deletions

View File

@ -0,0 +1,33 @@
package leenkx.logicnode;
class BitwiseMathNode extends LogicNode {
/** The operation to perform. **/
public var property0: String;
public function new(tree: LogicTree) {
super(tree);
}
override function get(from: Int): Dynamic {
final op1: Int = inputs[0].get();
if (property0 == "negation") {
return ~op1;
}
final op2: Int = inputs[1].get();
return switch (property0) {
case "and": op1 & op2;
case "or": op1 | op2;
case "xor": op1 ^ op2;
case "left_shift": op1 << op2;
case "right_shift": op1 >> op2;
case "unsigned_right_shift": op1 >>> op2;
default: 0;
}
}
}