|
|
Am 07.09.2010 00:12, schrieb Christian Froeschlin:
> esterichia wrote:
>
>> Is it possible to use define fx, fy as macros? The transformation I
>> want to
>> apply depends on some parameters I have defined and parameters can not
>> be passed
>> to functions.
>
> Not quite sure what you mean. This works for me:
>
> #local PARAM = 5;
> #local f_param = function {2*x*PARAM}
> #debug str(f_param(1,0,0),3,0)
> #debug "\n"
Note that strictly speaking, from the function's perspective this is a
constant, not a parameter, i.e.:
#local PARAM = 5;
#local f_param = function {2*x*PARAM}
#local PARAM = 6; // this will have no effect on the function result
#debug str(f_param(1,0,0),3,0)
#debug "\n"
Post a reply to this message
|
|