Skip to content
Snippets Groups Projects
  • Naveen Albert's avatar
    c52ef4ac
    func_math: Return integer instead of float if possible · c52ef4ac
    Naveen Albert authored
    The MIN, MAX, and ABS functions all support float
    arguments, but currently return floats even if the
    arguments are all integers and the response is
    a whole number, in which case the user is likely
    expecting an integer. This casts the float to an integer
    before printing into the response buffer if possible.
    
    ASTERISK-29495
    
    Change-Id: I902d29eacf3ecd0f8a6a5e433c97f0421d205488
    c52ef4ac
    History
    func_math: Return integer instead of float if possible
    Naveen Albert authored
    The MIN, MAX, and ABS functions all support float
    arguments, but currently return floats even if the
    arguments are all integers and the response is
    a whole number, in which case the user is likely
    expecting an integer. This casts the float to an integer
    before printing into the response buffer if possible.
    
    ASTERISK-29495
    
    Change-Id: I902d29eacf3ecd0f8a6a5e433c97f0421d205488
func_math.c 18.28 KiB