Hi
I am having trouble making my ISlider respect an increment value of .3, for example. When dragging the slider it will show all sorts of values but none of them are increments of .3. I cannot remember seeing this before. Any ideas?
My code:
[IShowActions, 0]
[IConfig, 3.5]
[ISlider, "My Value", 0, .3, -4, 4, "",
, , 1]
My second problem has to do with the decimal point count of variables which to my knowledge are always assigned as floats, regardless of the values’ integer or real nature.
It seems there is just 5 decimal points of precision in the stored value. But calculated values display 6 points of precision (displayed in a note window or the notebar).
This causes problems as zspheres use 6 points of precision to describe size, position and rotation values. There does not seem to be a way to retain that precision if a scripted function needs to store those values.
A note window clearly shows 6 decimal points from a [Val,…] calculation with a 5 decimal point value(the max that is apparently allowed) so perhaps the radix is calculated incorrectly when storing 6 decimals points in a variable ?
Example code:
[IButton, "Test", ,
[VarSet, decimals5, .00001]
[VarSet, decimals6, .000001]
[Note, [StrMerge, "5 decimals points reveals the 6th: 2*0.00001 = " , [Val, 2*decimals5], "
With 6 decimals it does not work: 2*0.000001 = ", [Val, 2*decimals6], ]]
]
Hope someone can shed some light on this. I was thinking that perhaps bitshifting the zsphere values before storing them might work. But I am hoping I am just missing something obvious.
For what it is worth I tested both these problems on a 64bit and 32 bit machine, not that it should matter.
Thanks in advance.