POV-Ray : Newsgroups : povray.off-topic : Still random : Re: FIXED! Server Time
29 Sep 2024 17:20:40 EDT (-0400)
  Re: FIXED!  
From: Orchid XP v8
Date: 10 May 2009 12:04:58
Message: <4a06fb2a$1@news.povray.org>
scott wrote:

> Couldn't you just define a * function that takes a velocity and a time 
> and returns a position?

No.

I rephrase: Not if you want those to be different types.

The functions +, -, * and / are only defined to operate on values of the 
exact same type (and return a result of the same type also).

You can, however, define new functions with the appropriate types. (Say, 
have functions named |+|, |-|, etc. or something like that.) 
Alternatively, you can provide new definitions for +, -, etc., but then 
you have to manually remove access to the standard versions every time 
you want to use them.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

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