Ok, it seems the workaround I discovered doesn't work in all situations, like in the sample skin below (which is close to my actual usage scenario):
Code: Select all
[Variables]
Step=10
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
---Measures---
[Rotation]
Group=RotationGroup
Measure=Calc
Formula=((360+Rotation+#Step#)%360)
DynamicVariables=1
[Latitude]
Group=RotationGroup
Measure=Calc
Formula=(-180/PI*Asin(Sin(Rotation*PI/180))+0)
;Formula=(((Rotation+90)%180-90)*(1-2*(Trunc((Rotation+270)/180)%2))+0)
DynamicVariables=1
[Longitude]
Group=RotationGroup
Measure=Calc
Formula=(180-(Rotation+180)%360)
DynamicVariables=1
[Signed]
Group=RotationGroup
Measure=Calc
Formula=((Rotation+180)%360-180)
DynamicVariables=1
---Meters---
[Text]
Meter=String
FontFace=Consolas
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontSize=16
AntiAlias=1
MeasureName=Rotation
MeasureName2=Latitude
MeasureName3=Longitude
MeasureName4=Signed
Text="Rotation = %1#CRLF#Latitude = %2#CRLF#Longitude = %3#CRLF#Signed = %4"
LeftMouseUpAction=[!TogglePauseMeasureGroup RotationGroup][!UpdateMeter *][!Redraw]
DynamicVariables=1
The skin simply converts a 0° to 360° rotation angle into its equivalent in latitude (-90° to 90°) and longitude (-180° to 180°) coordinates, as well as to the signed -180° to 180° interval. When I apply the "+0" workaround to remove the "-" in front of "0" as described above, only my previous
(((Rotation+90)%180-90)*(1-2*(Trunc((Rotation+270)/180)%2))+0) formula properly yields the normal, unsigned 0, with the workaround failing when applied to my current (and shorter)
(-180/PI*Asin(Sin(Rotation*PI/180))+0) formula. In this case, the skin incorrectly converts the 0° and 180° rotations to
-0 (instead of plain
0) for both the numeric and the string value of the measure:
SignedZero.jpg
For the record, there isn't any "near zero but not quite zero" value that would justify the sign in front of a, say, -0.00000001 or such. It's just the raw zero that for some reason carries the negative sign in front of it when it shouldn't.
So, it looks like a fix is in fact needed for this, especially since I use the numerical value of the measure, on which I can't apply the (string value typical) Substitute to remove the unwanted / incorrect negative sign in front of the 0...

You do not have the required permissions to view the files attached to this post.