Modulus
Synergiance
We have the other simple operations, Multiplication, Division, Addition, and Subtraction. I was looking for Modulus, normally % operator and is effectively the remainder of integer division. It would be nice if we had this basic operator.
Log In
Tupper - VRChat Head of Community
open
Μerlin
This has been partially resolved for a while, but modulus is only defined for for the following types:
float
, double
, decimal
, and int
. There is a related canny for adding the remaining types: https://vrchat.canny.io/vrchat-udon-closed-alpha-feedback/p/long-remainder At the moment we're still missing modulus for the following types:
byte
, sbyte
, short
, ushort
, uint
, long
, and ulong
. Of these types, the currently exposed nodes cannot trivially represent modulus operations on uint
, long
, and ulong
since their bit depth is larger than what the currently exposed modulus nodes can use.Tupper - VRChat Head of Community
in progress
Tupper - VRChat Head of Community
complete
This has been added, but it is called "remainder".
Synergiance
Tupper - VRChat Head of Community: I've searched as well as numerous other people and none of us can find "remainder" in the list of nodes we can add. This is with Udon version
UDONSDK-2020.01.14.10.47_Public
Tupper - VRChat Head of Community
Synergiance: Hmm, gotcha. We'll take another look.
PhaxeNor
This was added in UDONSDK-2020.01.14.10.47_Public, however, it does not show up on the list anywhere
hakanai
I’d almost say that remainder should be a second output from the division operation... but then modulo/modulus and remainder from a division aren’t the same thing if the thing you’re dividing is negative, so that adds hurt.
Foorack
Thank you, although previously already reported. Please upvote those as well, missing modulo is truly a pain!
Synergiance
Ah thank you, this didn't show up for me when searching modulus