POV-Ray : Newsgroups : povray.general : Q: vector promotion : Q: vector promotion Server Time
13 Aug 2024 03:13:24 EDT (-0400)
  Q: vector promotion  
From: Margus Ramst
Date: 12 Nov 1998 15:25:25
Message: <364B446C.923BA800@peak.edu.ee>
Hi all,

I've got this problem (not serious, but got me wondering)...

When a macro param is a vector (e.g. I use dot operators on it), it seems I
can't use a float identifier to represent it - it doesn't get promoted to a
vector. Example:

#macro MyMacro(Vector)
	(Vector.x + Vector.y + Vector.z)
#end

MyMacro(<3,3,3>) is OK but
MyMacro(3) gets an error

Why is the float not promoted to a vector? Is it because POV can't tell the type
of a macro param?

Margus


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.