Quantcast
Channel: Answers by "Noise crime"
Viewing all articles
Browse latest Browse all 90

Answer by Noise crime

$
0
0

Normally you'd use a cast to convert between a float and int. So you'd define your variable as a float, but when you need the value as an int youd cast it e.g. x = 5 + (int)myFloat;

There are other methods depending upon your needs to manage the conversions, such as ceiling() or floor(),


Viewing all articles
Browse latest Browse all 90

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>