WFL: Rename int() -> trunc()
This is done to emphasise this function's status as a rounding function rather than a typecasting function. Related to PR #660
This commit is contained in:
parent
9633587926
commit
1dc47023ee
2 changed files with 5 additions and 5 deletions
|
@ -285,7 +285,7 @@ Version 1.13.4+dev:
|
|||
* pair() function that produces a key-value pair suitable for
|
||||
passing to tomap() - this also means key-value pairs are now
|
||||
serializable (relevant in FormulaAI)
|
||||
* sgn(), int() and frac() functions for decimal numbers
|
||||
* sgn(), trunc() and frac() functions for decimal numbers
|
||||
* Bugfixes:
|
||||
* Dice operator is now synced (where possible)
|
||||
* Modulus (%) operator now works on decimal numbers
|
||||
|
|
|
@ -1318,10 +1318,10 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
class int_function : public function_expression {
|
||||
class trunc_function : public function_expression {
|
||||
public:
|
||||
explicit int_function(const args_list& args)
|
||||
: function_expression("int", args, 1, 1)
|
||||
explicit trunc_function(const args_list& args)
|
||||
: function_expression("trunc", args, 1, 1)
|
||||
{}
|
||||
private:
|
||||
variant execute(const formula_callable& variables, formula_debugger *fdb) const {
|
||||
|
@ -1589,7 +1589,7 @@ function_symbol_table& get_functions_map() {
|
|||
FUNCTION(null);
|
||||
FUNCTION(ceil);
|
||||
FUNCTION(floor);
|
||||
FUNCTION(int);
|
||||
FUNCTION(trunc);
|
||||
FUNCTION(frac);
|
||||
FUNCTION(sgn);
|
||||
FUNCTION(round);
|
||||
|
|
Loading…
Add table
Reference in a new issue