Crystal Forum
How do you convert float to Int?
Help & Support
jacob
November 8, 2019, 6:11pm
1
Sorry for this newbie question, I tried
round
and
as
, they don’t for that.
asterite
November 8, 2019, 6:27pm
2
to_i
4 Likes
Related topics
Topic
Replies
Views
Activity
Integer divide is a float?
Help & Support
2
350
March 31, 2020
Error: can't cast UInt32 to UInt8
Help & Support
4
1221
January 4, 2020
How to create a mapping of basic Types (Int32, String, Int8, etc) to their conversion methods?
Help & Support
3
638
July 29, 2019
How to convert a float into a desired precision, then convert it to bigdecimal? (correct way?)
Help & Support
2
287
August 11, 2022
Generic & to_i
Help & Support
7
527
December 21, 2019