It is currently March 29th, 2024, 1:06 pm

Variables between two numbes (calc measure) - SOLVED!!!

Get help with creating, editing & fixing problems with skins
csm725
Posts: 46
Joined: August 16th, 2010, 4:29 pm

Variables between two numbes (calc measure) - SOLVED!!!

Post by csm725 »

Hey there Rainmeter.
I was wondering what the correct way was to phrase the following:
If 'x' is between 'α' and 'β', then return 1, if not, return 0.
(of course I am not really using 'x', 'alpha', and 'beta')
I got this far:

Code: Select all

(α<x<β)?1:0
That didn't work.
I tried this:

Code: Select all

(x<β && x>α)?1:0
To no avail.
Then I tried this:

Code: Select all

(x<β & x>α)?1:0
Also, no success.
How is this possible?[/size]
Last edited by csm725 on September 30th, 2010, 6:06 pm, edited 1 time in total.
csm725
Posts: 46
Joined: August 16th, 2010, 4:29 pm

Re: Variables between two numbes (calc measure)

Post by csm725 »

Nevermind. Here's how my code looked like for those who are interested:
(measuring WiFi strength)

Code: Select all

[calc60]
measure=calc
formula=((MeasureStrength<60) && (MeasureStrength>40))?1:0
IfEqualValue=1
IfEqualAction=!RainmeterSetVariable wifi 60
dynamicvariables=1
Substitute=".00000":""