0
[ANSWERED]Still a bit confused on the difference between / and //
I know it is a simple question with a simple answer. I am fluent in lua which deals with alot of math so I know I am just overthinking it. Thank you in advanced!
2 odpowiedzi
+ 1
Hunter MacInnes
/ is normal division which returns value in float
// is floor division which returns value in int without decimal part
So 5 / 2 = 2.5
5 // 2 = 2
4 / 2 = 2.0
4 // 2 = 2
+ 1
/ results in a float. its regular division
// returns an int. its division that disregards remainders.
ex.
11 / 2 == 5.5
11 // 2 == 5