|
|
Hei igjen.
Tor Olav Kristensen wrote:
> (If you omit the parenthesis, then Var1 is promoted to
> a vector before it's added to a vector.)
This part of the expression would also have been
promoted to a vector if you hadn't passed 0 for the
second argument (X1) to the macro:
(Y2-Y1)/(X2-X1)*X1
> Sigmund Kyrre Aas wrote:
> ...
> // this one adds var1*x
> ...
It actually adds var1*(x + y + z)
(or <var1, var1, var1>)
Tor Olav
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html
Btw.: Here's a slightly simpler macro to do the same:
#macro intp(X,X1,Y1,X2,Y2)
((Y2-Y1)/(X2-X1)*(X-X1)+Y1)
#end
Post a reply to this message
|
|