|
|
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
|
|