Frictional Games Forum (read-only)
float number + music copyright - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: float number + music copyright (/thread-16345.html)



float number + music copyright - Cruzore - 06-20-2012

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?


RE: float number + music copyright - Traggey - 06-20-2012

(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.


RE: float number + music copyright - Cruzore - 06-20-2012

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.


RE: float number + music copyright - Apjjm - 06-20-2012

(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.


RE: float number + music copyright - Cruzore - 06-20-2012

Thank you, that cleared up a bunch.