diff --git a/fhem/FHEM/99_Utils.pm b/fhem/FHEM/99_Utils.pm index 9c8ed1f28..0037ecc36 100644 --- a/fhem/FHEM/99_Utils.pm +++ b/fhem/FHEM/99_Utils.pm @@ -237,6 +237,13 @@ fhemNc($$$) return $ret; } +sub +round($$) +{ + my($v,$n) = @_; + return sprintf("%.${n}f",$v); +} + 1; =pod @@ -245,47 +252,9 @@ fhemNc($$$)
-# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -# IMPORTANT: do not insert your own functions inside -# the file 99_Utils.pm! -# -# This file will be overwritten during an FHEM update and all -# your own inserts will be lost. -# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -# -# To avoid this, we recommend following procedure: -# -# 1. Create your own file 99_myUtils.pm from the template below, -# e.g. with FHEMWEB, Edit files, Editing 99_Utils.pm, and saving it as -# 99_myUtils.pm -# 2. Put this file inside the ./FHEM directory -# 3. Put your own functions into this new file -# -- - + This is a collection of functions that can be used module-independant + in all your own development
--# start-of-template -package main; - -use strict; -use warnings; -use POSIX; - -sub -myUtils_Initialize($$) -{ - my ($hash) = @_; -} - -1; - -
-