A useful operator is the modulus (in many programming language is that
%) to calculate the remainder of a integer division.
Funny enough, the
%-operator works in the online creator, but doesn’t work in the preview or on the watch.
Has this changed since?
I have the ‘
%’ operator working in both preview and on my Samsung Gear Sport.
We’ve tested % on the creator, android wear, and Tizen and it seems to work as expected. Let us know if you’re seeing anything different and we’ll investigate!
It is working for me.
I did try using other mathematics before I realised you supported it. (It was not initially in online documentation).
I’ve just finished testing.
But this doesn’t work:
Tested on a Huawei Watch 2 Classic (Android Wear 2).
Having modulus would be a great added value in conditionals.
Can you try putting the modulus between parenthesis in your conditional? i.e.
I did that in the same test.
None of the above worked on my watch.
Just quickly tested/verified:
on build 220.127.116.11 .
I am using ‘%’ quite extensively on my ‘moon phase’ test face and various gauges, all with no apparent issues.
Hi @Svensei38 - our test team confirmed $(#Ds#%2)=1?100:0$ works for them on all platforms (Wear, Tizen, Web)
I can confirm a successful test now .
I’ve tested this watchface:
This operator will save me a lot of work.
Thanks for all the help.