Commit 0b0e9fa1 authored by garciay's avatar garciay
Browse files

Add ff_abs() function for float absolute value

parent 5c600839
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
@@ -55,6 +55,20 @@ module LibItsCommon_Functions {
            return p_number;    
            return p_number;    
        }
        }


        /**
         * @desc    Computes the absolute value of an integer 
         * @param   p_number    the number
         * @return  Absolute value of the number
         */
        function ff_abs(in float p_number) 
        return float {
            
            if(p_number < 0.0) {
                return 0.0 - p_number;
            }
            return p_number;    
        }

        /**
        /**
         * @desc    Compares two values and returns the lowest onde  
         * @desc    Compares two values and returns the lowest onde  
         * @param   p_a     First value
         * @param   p_a     First value