Removed

Share your advanced PureBasic knowledge/code with the community.
Dr_Wildrick
User
User
Posts: 36
Joined: Fri Feb 23, 2007 8:00 pm
Location: New York

Removed

Post by Dr_Wildrick »

Removed
Last edited by Dr_Wildrick on Sun Feb 24, 2008 5:58 am, edited 1 time in total.
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Why not using a macro? :wink:

Code: Select all

Macro Interpolate(x, y, dx, dy)
     ((x*dy+y*dx)/(dx+dy))
EndMacro
PB 4.30

Code: Select all

onErrorGoto(?Fred)
Dr_Wildrick
User
User
Posts: 36
Joined: Fri Feb 23, 2007 8:00 pm
Location: New York

Post by Dr_Wildrick »

Removed
Last edited by Dr_Wildrick on Sun Feb 24, 2008 5:59 am, edited 1 time in total.
#NULL
Addict
Addict
Posts: 1499
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Post by #NULL »

didn't we just have that? (added some brackets :P )

Code: Select all

Macro Interpolate(x, y, dx, dy)
     (((x)*(dy)+(y)*(dx))/((dx)+(dy)))
EndMacro
especially if you use mult./div. ..
Dr_Wildrick
User
User
Posts: 36
Joined: Fri Feb 23, 2007 8:00 pm
Location: New York

Removed

Post by Dr_Wildrick »

Removed
Last edited by Dr_Wildrick on Sun Feb 24, 2008 5:59 am, edited 1 time in total.
#NULL
Addict
Addict
Posts: 1499
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Post by #NULL »

it's just if you use a macro with expressions, like an addition at place of a macro-parameter. the inner calculation becomes wierd as the results.
Dr_Wildrick
User
User
Posts: 36
Joined: Fri Feb 23, 2007 8:00 pm
Location: New York

Removed

Post by Dr_Wildrick »

Removed
Post Reply