View Full Version : Scenegraph
Ajarn
02-01-2004, 10:15 AM
On each and every sin(rand()) in the project it should be sin((float)rand()), so it can compile.
bladder
02-01-2004, 01:45 PM
well actually, it *should* be sin(static_cast<float>(rand())) :)
But I was just too lazy to cast and I accepted the warnings as they were. Or do you mean it dosnt compile at all. Because on a normal setup that should compile just fine only give a few warnings...
anubis
02-01-2004, 02:06 PM
isn't this kind of nit picking ?
Ajarn
02-01-2004, 02:06 PM
c:\Downloads\scenegraph\scenegraph\scenegraph.cpp( 296) : error C2668: 'sin' : ambiguous call to overloaded function
So, It NEEDS to be casted.
bladder
02-01-2004, 02:15 PM
oh really? :huh: I thought there was only one implementation of the sin function. One that takes a double as a parameter. You're using vc6 right?
Ajarn
02-01-2004, 02:16 PM
Nope. .Net 2003 now.
Sin now takes double, float, long double, complex, and...
valarray.
anubis
02-01-2004, 02:18 PM
there is sin (double -> double) and sinf (float -> float) afaik
Ajarn
02-01-2004, 02:18 PM
I think this is the stl sin.
anubis
02-01-2004, 02:19 PM
Ajarn : that's compiler (library) specific then
anubis
02-01-2004, 02:21 PM
what is valarray ???
Ajarn
02-01-2004, 02:21 PM
Ohh. Okay. But since it was in the vcproj form, I think that it should be corrected so that it works with .NET 2003. Hopefully people can figure it out otherwise.
double
float
and long double are all in math.h
vallarray is a stl class type. header file <valarray>
bladder
02-01-2004, 02:25 PM
Adding the cast and updating as we speak...
Ajarn
02-01-2004, 02:26 PM
Thanks. Just want it to be easy for people to DL and compile right from the start.
anubis
02-01-2004, 02:31 PM
Ajarn : was just checking what you are refering to
obviously in this case casting is no nit picking at all :)
(and it should actually be an example that it never is)
vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.