mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 07:48:18 +00:00
vim-patch:8.1.1111: it is not easy to check for infinity
Problem: It is not easy to check for infinity.
Solution: Add isinf(). (Ozaki Kiichi, closes vim/vim#3787)
fda1bff39f
This commit is contained in:
@@ -11276,7 +11276,6 @@ static void f_has(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
#endif
|
||||
"tablineat",
|
||||
"tag_binary",
|
||||
"tag_old_static",
|
||||
"termguicolors",
|
||||
"termresponse",
|
||||
"textobjects",
|
||||
@@ -12029,6 +12028,15 @@ static void f_islocked(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
clear_lval(&lv);
|
||||
}
|
||||
|
||||
// "isinf()" function
|
||||
static void f_isinf(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
{
|
||||
if (argvars[0].v_type == VAR_FLOAT
|
||||
&& xisinf(argvars[0].vval.v_float)) {
|
||||
rettv->vval.v_number = argvars[0].vval.v_float > 0.0 ? 1 : -1;
|
||||
}
|
||||
}
|
||||
|
||||
// "isnan()" function
|
||||
static void f_isnan(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
{
|
||||
|
Reference in New Issue
Block a user