From 3abf0a362dd15ebc07d7d6a25059cab5c53b1b03 Mon Sep 17 00:00:00 2001 From: eficas <> Date: Mon, 27 Feb 2006 18:26:40 +0000 Subject: [PATCH] ajout ceil pour parametres --- Extensions/param2.py | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.39.2