Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
RokuMarkn
Visitor

Re: Math Functions

The easiest way to make it work with negatives is probably to check if the number is negative at the beginning. If so, make it positive and set a flag. Then run through the code you have, and at the end check the flag and if it's set, prepend a minus sign to the result.

--Mark
0 Kudos
agmark
Visitor

Re: Math Functions

Thanks Mark. Finally got back to check it out and you're right, checking for a negative and setting a flag was the solution.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.