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
Hack to convert [Big]Ints to any Int type
Help & Support
0
212
May 8, 2023
Integer divide is a float?
Help & Support
2
339
March 31, 2020
Question about division
Help & Support
2
59
August 31, 2025
JSON::Any#as_f unpredictable when number might sometimes be an integer
Help & Support
4
267
December 10, 2022
How to convert a float into a desired precision, then convert it to bigdecimal? (correct way?)
Help & Support
2
284
August 11, 2022