What does <varies> guarantee or not?

In Verse, Sin( ) carries the varies specifier and apparently converges and diverges. Does this mean that sin() is guaranteed to produce a non-guaranteed result?

And I am curious about the non-guaranteed result. If I input the same value into sin( ) now, it seems to produce the same result every time. Why would the output change?

Any thoughts on this appreciated.

1 Like

I suspect the reason may be that the floating point precision may vary from platform to platform.

1 Like

That makes sense. The vast majority of cases where varies is used is with float values.

I wanted to add that in the minority of non-float cases, it is specifically mentioned that the output might change in a future version of Verse, so in this case, they seem to be future-proofing the code, noting that it will generate a different output in the future.

 # Note: may be changed in a future release to return a single instance per game. Round-local behavior should not be relied upon.
    GetSession<native><public>()<varies>:session
2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.