Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
316faf67
Commit
316faf67
authored
Feb 22, 2013
by
Masaki Muranaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetic changes. Just added empty lines.
parent
71a13f9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
src/numeric.c
src/numeric.c
+10
-0
No files found.
src/numeric.c
View file @
316faf67
...
...
@@ -184,6 +184,7 @@ flo_to_s(mrb_state *mrb, mrb_value flt)
{
char
buf
[
32
];
int
n
;
mrb_float
value
=
mrb_float
(
flt
);
if
(
isinf
(
value
))
{
...
...
@@ -280,6 +281,7 @@ flo_mod(mrb_state *mrb, mrb_value x)
{
mrb_value
y
;
mrb_float
fy
,
mod
;
mrb_get_args
(
mrb
,
"o"
,
&
y
);
fy
=
mrb_to_flo
(
mrb
,
y
);
...
...
@@ -339,6 +341,7 @@ flo_eq(mrb_state *mrb, mrb_value x)
{
mrb_value
y
;
volatile
mrb_float
a
,
b
;
mrb_get_args
(
mrb
,
"o"
,
&
y
);
switch
(
mrb_type
(
y
))
{
...
...
@@ -727,6 +730,7 @@ static mrb_value
fix_mul
(
mrb_state
*
mrb
,
mrb_value
x
)
{
mrb_value
y
;
mrb_get_args
(
mrb
,
"o"
,
&
y
);
return
mrb_fixnum_mul
(
mrb
,
x
,
y
);
}
...
...
@@ -802,6 +806,7 @@ static mrb_value
fix_divmod
(
mrb_state
*
mrb
,
mrb_value
x
)
{
mrb_value
y
;
mrb_get_args
(
mrb
,
"o"
,
&
y
);
if
(
mrb_fixnum_p
(
y
))
{
...
...
@@ -841,6 +846,7 @@ static mrb_value
fix_equal
(
mrb_state
*
mrb
,
mrb_value
x
)
{
mrb_value
y
;
mrb_get_args
(
mrb
,
"o"
,
&
y
);
if
(
mrb_obj_equal
(
mrb
,
x
,
y
))
return
mrb_true_value
();
...
...
@@ -900,6 +906,7 @@ fix_and(mrb_state *mrb, mrb_value x)
{
mrb_value
y
;
mrb_int
val
;
mrb_get_args
(
mrb
,
"o"
,
&
y
);
y
=
bit_coerce
(
mrb
,
y
);
...
...
@@ -920,6 +927,7 @@ fix_or(mrb_state *mrb, mrb_value x)
{
mrb_value
y
;
mrb_int
val
;
mrb_get_args
(
mrb
,
"o"
,
&
y
);
y
=
bit_coerce
(
mrb
,
y
);
...
...
@@ -942,6 +950,7 @@ fix_xor(mrb_state *mrb, mrb_value x)
mrb_int
val
;
mrb_get_args
(
mrb
,
"o"
,
&
y
);
y
=
bit_coerce
(
mrb
,
y
);
val
=
mrb_fixnum
(
x
)
^
mrb_fixnum
(
y
);
return
mrb_fixnum_value
(
val
);
...
...
@@ -1279,6 +1288,7 @@ void
mrb_init_numeric
(
mrb_state
*
mrb
)
{
struct
RClass
*
numeric
,
*
integer
,
*
fixnum
,
*
fl
;
/* Numeric Class */
numeric
=
mrb_define_class
(
mrb
,
"Numeric"
,
mrb
->
object_class
);
mrb_include_module
(
mrb
,
numeric
,
mrb_class_get
(
mrb
,
"Comparable"
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment