MerlinVR / UdonSharp

An experimental compiler for compiling C# to Udon assembly
MIT License
678 stars 89 forks source link

Improve bitwise NOT code generation for signed types #120

Closed bdunderscore closed 3 years ago

bdunderscore commented 3 years ago

We can avoid needing a branch by using an XOR of the signed representation of -1 to implement bitwise NOT for signed types.