Hello
Under the [Rainmeter] section, does 'Update' make use of a number with a fractional part?
For measures/meters, does 'AverageSize' and 'UpdateDivider' make use of a number with a fractional part?
Generally, at what point is a given number rounded?
It is currently May 1st, 2024, 1:04 pm
Fractional Parts
-
- Posts: 23
- Joined: April 15th, 2012, 5:39 am
-
- Developer
- Posts: 2689
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: Fractional Parts
Nope, these options should be integers. The fractional part is just stripped off without rounding.NewWave wrote:Under the [Rainmeter] section, does 'Update' make use of a number with a fractional part?
For measures/meters, does 'AverageSize' and 'UpdateDivider' make use of a number with a fractional part?
For the values that do not require an integer, I believe it is 5 decimal places before rounding.NewWave wrote:Generally, at what point is a given number rounded?
-Brian
-
- Posts: 23
- Joined: April 15th, 2012, 5:39 am
Re: Fractional Parts
Thanks a bunch.
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Fractional Parts
Might be a few more.
That returns a valid fractional number up to 16 places. If I make it 17 or more, it just returns zeros after 16 places.
However, this returns only 5 decimal places...
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
[MeasureCalc]
Measure=Calc
Formula=PI
[Meter1]
Meter=String
MeasureName=MeasureCalc
FontSize=13
FontColor=255,255,255,255
NumOfDecimals=16
However, this returns only 5 decimal places...
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
[MeasureCalc]
Measure=Calc
Formula=PI
[Meter1]
Meter=String
FontSize=13
FontColor=255,255,255,255
Text=[MeasureCalc]
NumOfDecimals=16
DynamicVariables=1
-
- Developer
- Posts: 2689
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: Fractional Parts
Ah, I see.
I tried something similar, but I didn't utilize the NumOfDecimals option.
In the About Dialog, the measure with Formula=PI only shows 5 decimal places, but I guess that is the dialog itself rounding the value, not the actual measure.
-Brian
I tried something similar, but I didn't utilize the NumOfDecimals option.
In the About Dialog, the measure with Formula=PI only shows 5 decimal places, but I guess that is the dialog itself rounding the value, not the actual measure.
-Brian
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Fractional Parts
Looks to me that unless you are using a Rainmeter skin to help with the construction of your nuclear particle accelerator or with your human DNA sequencing work, it's best to consider that Rainmeter does stuff to 5 decimal places...Brian wrote:Ah, I see.
I tried something similar, but I didn't utilize the NumOfDecimals option.
In the About Dialog, the measure with Formula=PI only shows 5 decimal places, but I guess that is the dialog itself rounding the value, not the actual measure.
-Brian
-
- Moderator
- Posts: 1931
- Joined: January 29th, 2010, 1:43 am
- Location: Willmar, MN
Re: Fractional Parts
The String return of the measure returns up to five decimal points.
The Number return returns up to 16 decimal points. However, sometimes a seventeen decimal is returned that is incorrect.
For example, 1/3 returns 0.33333333333333331
The Number return returns up to 16 decimal points. However, sometimes a seventeen decimal is returned that is incorrect.
For example, 1/3 returns 0.33333333333333331
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .