It is currently April 28th, 2024, 11:52 am

Trailing Zeros

General topics related to Rainmeter.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Trailing Zeros

Post by jsmorley »

balala wrote: Ok, thanks anyway.
In digging a bit deeper, I think you are right. It does seem to have some weird behavior when the "range" is from a negative number to a positive number. I can't quite put my finger on it, but it does act a bit strange. Doesn't seem to like "0" at all.
User avatar
balala
Rainmeter Sage
Posts: 16183
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Trailing Zeros

Post by balala »

jsmorley wrote:In digging a bit deeper, I think you are right. It does seem to have some weird behavior when the "range" is from a negative number to a positive number. I can't quite put my finger on it, but it does act a bit strange. Doesn't seem to like "0" at all.
Could be this a bug?
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Trailing Zeros

Post by jsmorley »

balala wrote: Could be this a bug?
Could be. I'll have to see what the code monkeys think.
User avatar
balala
Rainmeter Sage
Posts: 16183
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Trailing Zeros

Post by balala »

Ok, thanks.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Trailing Zeros

Post by jsmorley »

balala wrote:Ok, thanks.
In further digging, I actually don't think it properly handles a "range" from a negative number to a positive number at all...

If you define a "range" (MinValue / MaxValue) that is from a negative number to a positive number, say

MinValue=-10
MaxValue=10

Then logically -10 would be 0%, 0 would be 50%, and 10 would be 100%.

The Line meter just doesn't seem to be able to handle this. It might be as much as "design limitation" as it is a "bug".

P.S. We have now completely hijacked and trashed the original poster's thread. That is entirely my fault for not really understanding what he was getting at to begin with.
User avatar
balala
Rainmeter Sage
Posts: 16183
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Trailing Zeros

Post by balala »

jsmorley wrote:In further digging, I actually don't think it properly handles a "range" from a negative number to a positive number at all...

If you define a "range" (MinValue / MaxValue) that is from a negative number to a positive number, say

MinValue=-10
MaxValue=10

Then logically -10 would be 0%, 0 would be 50%, and 10 would be 100%.

The Line meter just doesn't seem to be able to handle this. It might be as much as "design limitation" as it is a "bug".
The only weird thing is that your previous code works well.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Trailing Zeros

Post by jsmorley »

balala wrote: The only weird thing is that your previous code works well.
It actually doesn't. It was misleading. It looked like it worked right, but if you change the MinValue and MaxValue so it should never hit the top or bottom, it still does.
User avatar
balala
Rainmeter Sage
Posts: 16183
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Trailing Zeros

Post by balala »

Strange...
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Trailing Zeros

Post by jsmorley »

balala wrote:Strange...
Yes. The Bar meter seems to handle this fine, but not the Line meter. The logic should be identical in both cases, but it just isn't.
Resike
Posts: 33
Joined: May 1st, 2015, 1:25 am

Re: Trailing Zeros

Post by Resike »

To be honest even i don't know what i want yet, i'm just bouncing ideas and i will decide based on the results.

The main idea would be for the user to see if the price-percentage went up or down since the last update. And relatively how big was that value change.

I can point you to this little graph:

http://addgadgets.com/image/currency_meter.png