From: eficas <> Date: Mon, 27 Feb 2006 18:26:40 +0000 (+0000) Subject: ajout ceil pour parametres X-Git-Tag: merge_mars_06~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3abf0a362dd15ebc07d7d6a25059cab5c53b1b03;p=tools%2Feficas.git ajout ceil pour parametres --- diff --git a/Extensions/param2.py b/Extensions/param2.py index b8c56998..831308e8 100644 --- a/Extensions/param2.py +++ b/Extensions/param2.py @@ -66,6 +66,7 @@ class Binop(Formula): return validator(self.eval()) original_sqrt=math.sqrt +original_ceil=math.ceil original_cos=math.cos original_sin=math.sin original_ncos=Numeric.cos @@ -74,6 +75,7 @@ original_nsin=Numeric.sin class Unop(Formula): opmap = { '-': lambda x: -x, 'sqrt': lambda x: original_sqrt(x), + 'ceil': lambda x: original_ceil(x), 'sin': lambda x: original_sin(x), 'cos': lambda x: original_cos(x) , 'ncos': lambda x: original_ncos(x), @@ -138,8 +140,10 @@ def sin(f): return Unop('nsin', f) Numeric.cos=cos Numeric.sin=sin def sqrt(f): return Unop('sqrt', f) +def ceil(f): return Unop('ceil', f) def cos(f): return Unop('cos', f) def sin(f): return Unop('sin', f) math.cos=cos math.sin=sin math.sqrt=sqrt +math.ceil=ceil