Sign in to follow this  
lol

[java] 3d keyword

Recommended Posts

I was just browsing somebody else's source code so I could figure out how to implement csg when I saw this
[source lang = 'java']

		//creating a ray starting starting at the face baricenter going to the normal direction

		Point3d p0= new Point3d();

		p0.x = (v1.x + v2.x + v3.x)/3d;

		p0.y = (v1.y + v2.y + v3.y)/3d;

		p0.z = (v1.z + v2.z + v3.z)/3d;

		Line ray = new Line(getNormal(),p0);


does anybody know what the 3d keyword means?

Share this post


Link to post
Share on other sites
it's not a keyword ... it means they're dividing by 3 as an double rather than a float or integer. I forget the exact name of the letter, but put "f" after values you want treated as floats

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this