FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
mruby/include/mruby/numeric.h at master · danieldevries/mruby · GitHub
danieldevries
/
mruby
Public
forked from
mruby/mruby
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
mruby
/
include
/
mruby
/
numeric.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
32 lines (24 loc) · 898 Bytes
Breadcrumbs
mruby
/
include
/
mruby
/
numeric.h
Copy path
File metadata and controls
32 lines (24 loc) · 898 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
** mruby/numeric.h - Numeric, Integer, Float, Fixnum class
**
** See Copyright Notice in mruby.h
*/
#ifndef
MRUBY_NUMERIC_H
#define
MRUBY_NUMERIC_H
#if
defined(
__cplusplus
)
extern
"C"
{
#endif
#define
POSFIXABLE
(
f
) ((f) <= MRB_INT_MAX)
#define
NEGFIXABLE
(
f
) ((f) >= MRB_INT_MIN)
#define
FIXABLE
(
f
) (POSFIXABLE(f) && NEGFIXABLE(f))
mrb_value
mrb_flo_to_fixnum
(
mrb_state
*
mrb
,
mrb_value
val
);
mrb_value
mrb_flo_to_str
(
mrb_state
*
mrb
,
mrb_value
flo
,
int
max_digit
);
mrb_value
mrb_fixnum_to_str
(
mrb_state
*
mrb
,
mrb_value
x
,
int
base
);
mrb_value
mrb_fixnum_plus
(
mrb_state
*
mrb
,
mrb_value
x
,
mrb_value
y
);
mrb_value
mrb_fixnum_minus
(
mrb_state
*
mrb
,
mrb_value
x
,
mrb_value
y
);
mrb_value
mrb_fixnum_mul
(
mrb_state
*
mrb
,
mrb_value
x
,
mrb_value
y
);
mrb_value
mrb_num_div
(
mrb_state
*
mrb
,
mrb_value
x
,
mrb_value
y
);
#if
defined(
__cplusplus
)
}
/* extern "C" { */
#endif
#endif
/* MRUBY_NUMERIC_H */
Back
|
FazBrowse Home
|
New Git URL