CosmicFlux
Member
Hi,
Is there a function that splits a Float into its integral and fractional parts? I've looked around, and the solutions I've come across seem to involve converting to strings, then pulling out the fractional as an index? Seems a bit clunky. Is there a better way?
For context, I have a C++ program that uses the modf function from cmath to achieve this. Is there an equivalent?
Thanks
Is there a function that splits a Float into its integral and fractional parts? I've looked around, and the solutions I've come across seem to involve converting to strings, then pulling out the fractional as an index? Seems a bit clunky. Is there a better way?
For context, I have a C++ program that uses the modf function from cmath to achieve this. Is there an equivalent?
Thanks