[asterisk-bugs] [JIRA] (ASTERISK-29495) Return integer instead of float if response is a whole number
Friendly Automation (JIRA)
noreply at issues.asterisk.org
Thu Aug 19 11:05:33 CDT 2021
[ https://issues.asterisk.org/jira/browse/ASTERISK-29495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255999#comment-255999 ]
Friendly Automation commented on ASTERISK-29495:
------------------------------------------------
Change 16361 merged by Friendly Automation:
func_math: Return integer instead of float if possible
[https://gerrit.asterisk.org/c/asterisk/+/16361|https://gerrit.asterisk.org/c/asterisk/+/16361]
> Return integer instead of float if response is a whole number
> -------------------------------------------------------------
>
> Key: ASTERISK-29495
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-29495
> Project: Asterisk
> Issue Type: Improvement
> Security Level: None
> Components: Functions/func_math
> Affects Versions: 18.5.0
> Reporter: N A
> Assignee: N A
>
> While support for floats is good, a minor caveat with these is if all arguments are integers, the answer will be an whole number and an integer response is likely expected. Currently these always returns a float for MAX, MIN, and ABS. This patch causes the response to be cast to an integer before being printed into the buffer if the answer is a whole number.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list