Thread: Avisynth+
View Single Post
Old 23rd August 2019, 23:43   #4835  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
I noticed an oddity in the way negative zero variables are converted to string when they're float. The variables in the script are never negative, but I want them to display that way, unless they're zero. The upshot is....

This displays as 0
subtitle(string(float(-0), "%.0f"))

While this displays as -0
subtitle(string(-float(0), "%.0f"))

As does this
xxx = float(0)
subtitle(string(-xxx, "%.0f"))

And this
xxx = -float(0)
subtitle(string(xxx, "%.0f"))

But not for a double negative.
xxx = -float(0)
subtitle(string(-xxx, "%.0f"))

Avisynth 2.6 doesn't display the negative sign for any of them.

Cheers.
hello_hello is offline