Hi there,
it looks like some operators are missing, like:
//: integer division~:bitwise XOR&,|(bitwise AND and OR)
Is there any way (or plan) to add them?
Thank you
Hi there,
it looks like some operators are missing, like:
//: integer division~:bitwise XOR&, | (bitwise AND and OR)Is there any way (or plan) to add them?
Thank you
Welcome to the forum.
Processing supports multiple languages so to answer your question we need to know which mode /language you are interested in.
![]()
Thanks!
Added to the title for clarity.
āL5ā is the latest added category so far. This time for the Lua flavor on top of the Lƶve2D framework:
Never used L5 / Lua so canāt help you there.
@lee might be able to help. He will get notified of this post.
Hi everyone!
L5 is built with LOVE framework, which uses LuaJIT. It includes a Lua Bit Operations Module.
//: integer division is native floor division, written like this: floor(a/b)~:bitwise XOR, is written as: bit.bxor(x1 [,x2...])&, | (bitwise AND and OR) are written as: bit.band(x1 [,x2...]) (or more args) and bit.bor(x1 [,x2...]).By default this bit module is loaded at runtime (so you can just run these examples above), but itās slightly faster to load it at the start of your main.lua file local bit = require('bit') to make the dependency explicit and limit scope and provide faster access to bit.* functions. See the BitOp API page for more info. (Update: Reading more into this, i think itās also required to explicitly require the bit module on Silicon-based macs/iOS because the JIT compiler is turned off by default on these)
If someone reading this wants to produce a good Bitwise operations tutorial for the L5lua tutorial pages, or to convert these 4 Processing bitwise tutorials to L5 (which are CC-BY NC SA licensed) that would be great ![]()
Fantastic, thank you! I had a go with XOR and it did work.
Oh great! Iāll try to get some more info about these onto the L5 website so other people can find out about them more readily.
Thanks to contributor Nilay Kumar there is now a Bitwise Operators page in the L5 Examples