PsxDoomForever wrote: ↑November 5th, 2023, 5:36 pm
If I have 4 frames for the upcoming animation. Is it correct to name files starting with 0. Or starting with the number 1?
As ZXCVBOT mentioned, it's up to you - there are advantages and disadvantages to either.
Starting at 0 makes it easier to work with simple % aka the modulo operation (i.e. the integer remainder of a division), but then a self incrementing measure (Calc in this case) will first increment to 0 (its default) + 1, so 1, if you want to avoid complications such as disabling it initially to make it 0.
However, even a modulo involving operation can be made to start at 1, by doing (ThisMeasure % UpperLimit + 1) instead of ((ThisMeasure + 1) % UpperLimit) so for simplicity, starting at 1 would be easier in this case, albeit from a strict mathematical point of view starting at 0 would make more sense and fit better with other operations.
Last edited by Yincognito on November 5th, 2023, 7:21 pm, edited 1 time in total.
PsxDoomForever wrote: ↑November 5th, 2023, 5:36 pm
If I have 4 frames for the upcoming animation. Is it correct to name files starting with 0. Or starting with the number 1?
There is no such thing, as correct way. As ZXCVBOT said, both ways are correct, but numbering the images from 0 is simpler approach, because the result of a modulo operation (%) on a mathematical formula is starting from 0. If you want to create a measure to increase the values from 0 or 1 to the largest possible value, is much more easier to write a Formula=(( Measure + 1 ) % 20 ) (for instance) option on a Calc measure (the result of this formula increases from 0 to 19 - just an example, which not necessary has something to do with your need), than something like Formula=((( Measure + 1 ) >= 20) ? 1 : ( Measure + 1 )) to get the result in the 1 - 20 range.
Yeah, no worries, I got beaten by ZXCVBOT too, haha! Anyway, to put this another way, starting at 0 can be more practical, while starting at 1 can be more user friendly. The choice depends on the user and the circumstances.
You both didn't beat ( ) anyone - I'm not talking about the time, rather you both point to something insightful - me on the other hand - heh - just blurt out whatever's on my mind, without getting into any technicalities, sometimes, full of mistakes.
ZXCVBOT wrote: ↑November 5th, 2023, 7:56 pm
You both didn't beat ( ) anyone - I'm not talking about the time, rather you both point to something insightful - me on the other hand - heh - just blurt out whatever's on my mind, without getting into any technicalities, sometimes, full of mistakes.
It's the intent that matters. Plus, you're doing quite well helping out, for someone who just recently expanded his horizon in Rainmeter, so to speak. Give it time and you'll get better and better at that.