Skip to content

Commit d823807

Browse files
committed
fixed int (round)
1 parent 995f454 commit d823807

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

arc.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,13 +1339,13 @@ Addition. This operator also performs string and list concatenation.
13391339
atom a = vargs[0];
13401340
switch (a.type) {
13411341
case T_STRING:
1342-
*result = make_number(round(atof(a.as<std::string>().c_str())));
1342+
*result = make_number(atol(a.as<std::string>().c_str()));
13431343
break;
13441344
case T_SYM:
1345-
*result = make_number(round(atof(a.as<std::string *>()->c_str())));
1345+
*result = make_number(atol(a.as<std::string *>()->c_str()));
13461346
break;
13471347
case T_NUM:
1348-
*result = make_number(round(a.as<double>()));
1348+
*result = make_number((long)(a.as<double>()));
13491349
break;
13501350
case T_CHAR:
13511351
*result = make_number(a.as<char>());

arc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#endif
3535

3636
namespace arc {
37-
constexpr auto VERSION = "0.20";
37+
constexpr auto VERSION = "0.21";
3838

3939
enum type {
4040
T_NIL,

0 commit comments

Comments
 (0)