#Ceil and Floor
Ceil and Floor
If you ever want to get the rounded-up result for a division, much like you'd do with // for floor, you could use math.ceil(3/2) for 15 or the much shorter -(-3//2) for 8 bytes.
math.floor(n) : 13 bytes+12 for import
n//1 : 4 bytes
math.ceil(n) : 12 bytes+12 for import
-(-n//1) : 8 bytes
#Ceil and Floor
If you ever want to get the rounded-up result for a division, much like you'd do with // for floor, you could use math.ceil(3/2) for 15 or the much shorter -(-3//2) for 8 bytes.
math.floor(n) : 13 bytes+12 for import
n//1 : 4 bytes
math.ceil(n) : 12 bytes+12 for import
-(-n//1) : 8 bytes
Ceil and Floor
If you ever want to get the rounded-up result for a division, much like you'd do with // for floor, you could use math.ceil(3/2) for 15 or the much shorter -(-3//2) for 8 bytes.
math.floor(n) : 13 bytes+12 for import
n//1 : 4 bytes
math.ceil(n) : 12 bytes+12 for import
-(-n//1) : 8 bytes
#Ceil and Floor
If you ever want to get the rounded-up result for a division, much like you'd do with // for floor, you could use math.ceil(3/2) for 15 or the much shorter -(-3//2) for 8 bytes.
math.floor(n) : 13 bytesbytes+12 for import
n//1 : 4 bytes
math.ceil(n) : 12 bytesbytes+12 for import
-(-n//1) : 8 bytes
#Ceil and Floor
If you ever want to get the rounded-up result for a division, much like you'd do with // for floor, you could use math.ceil(3/2) for 15 or the much shorter -(-3//2) for 8 bytes.
math.floor(n) : 13 bytes
n//1 : 4 bytes
math.ceil(n) : 12 bytes
-(-n//1) : 8 bytes
#Ceil and Floor
If you ever want to get the rounded-up result for a division, much like you'd do with // for floor, you could use math.ceil(3/2) for 15 or the much shorter -(-3//2) for 8 bytes.
math.floor(n) : 13 bytes+12 for import
n//1 : 4 bytes
math.ceil(n) : 12 bytes+12 for import
-(-n//1) : 8 bytes
I doubt this will get much attention#Ceil and hope I'm not repeating it, I search for ceil on all pages but couldn't find anything.Floor
If you ever want to get the rounded-up result for a division, much like you'd do with // for floor, you cancould use Mathmath.ceil(3/2) for 15 or the much cryptic and shorter -(-3//2) for 8. Saving 8b in the process bytes.
3//2 math.floor(n) : 13 bytes
n//1 :1 - 4b
-(-3//2) :2 -4 8b bytes
math.floorceil(3/2n):1 -12 15bbytes
math.ceil-(3-n/2/1) :2 -8 14b bytes
I doubt this will get much attention and hope I'm not repeating it, I search for ceil on all pages but couldn't find anything. If you ever want to get the rounded-up result for a division, much like you'd do with // for floor, you can use Math.ceil(3/2) for 15 or the much cryptic and shorter -(-3//2) for 8. Saving 8b in the process.
3//2 :1 - 4b
-(-3//2) :2 - 8b
math.floor(3/2):1 - 15b
math.ceil(3/2) :2 - 14b
#Ceil and Floor
If you ever want to get the rounded-up result for a division, much like you'd do with // for floor, you could use math.ceil(3/2) for 15 or the much shorter -(-3//2) for 8 bytes.
math.floor(n) : 13 bytes
n//1 : 4 bytes
math.ceil(n): 12 bytes
-(-n//1) : 8 bytes