Is vector() a function?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/03/2006 at 13:25, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.5
Platform: Windows ; Mac OSX ;
Language(s) : C.O.F.F.E.E ;---------
In the new Script Manager, the use of vector() is colored blue like all other function calls. Yet, the SDK docs call it a cast. It doesn't really function like a cast in other languages. It seems to me that it really is a function, one that converts data (one or three integers) to another type (a vector).I ask this because I'm working on a tutorial for COFFEE newbies, and would like a good excuse to avoid the word "cast". If vector() really is just another function, I can avoid the word in good conscience.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/03/2006 at 13:46, xxxxxxxx wrote:
I think you misread the documentation. It says that the components (parameters) are cast from int to float if needed.
It is a function (more aptly called 'method' in OOP circles) and it returns a vector. If you wish to avoid the word cast for describing what happens to the parameters, you could use converted instead.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/03/2006 at 16:29, xxxxxxxx wrote:
Um, I think you misread the docs.
On the main Reference page, vector() is categorized under the Casts heading.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/03/2006 at 17:41, xxxxxxxx wrote:
Nope. I never use the Reference page (easier to do Index).
I think you misconstrue the typical meaning of 'cast' (as in C (int)myrealvalue or C++ static_cast<MyObject*>(obj)) to the one in the docs wherein they are just classifying a set of methods. These are not literal 'casts' as in the other languages, just convenience methods for converting types.
Let's face it, tostring() could not be possibly performing a standard 'cast' as in other languages. And you can't really cast one class type to another as COFFEE is a typeless language.