Frictional Games Forum (read-only)

Full Version: float number + music copyright
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have seen some scripts where a float number would be represented like 0.0f, but I have experienced that it also works without that "f". What does that f stand for, and when do you use it?

Now for the second question, when I want to use a song or a soundtrack made by someone else for my custom story, do I have to contact the maker and ask if I can use it, or would be using that song for my custom story only not break the copyright, as long as I give credits?
(06-20-2012, 08:53 PM)FastHunteR Wrote: [ -> ]I have seen some scripts where a float number would be represented like 0.0f, but I have experienced that it also works without that "f". What does that f stand for, and when do you use it?

Now for the second question, when I want to use a song or a soundtrack made by someone else for my custom story, do I have to contact the maker and ask if I can use it, or would be using that song for my custom story only not break the copyright, as long as I give credits?
You must always have approval in order to use content created by someone else.
Thank you for clearing question 2 up.
But there's still the question what the "f" does at float numbers, since they still work without it.
(06-20-2012, 09:08 PM)FastHunteR Wrote: [ -> ]Thank you for clearing question 2 up.
But there's still the question what the "f" does at float numbers, since they still work without it.
Without it angelscript assumes the numbers are doubles, which are effectively a more "precise" version of a float (oversimplifying things a little, feel free to read up on floating point if you want to know the exact difference). In the end there won't really be any negative effects from putting doubles where you should have floats, but the conversion will sometimes give you warnings about loss of precision, which can clutter up the errors pane a little.
Thank you, that cleared up a bunch.