Sign in to follow this  
eskimo456

casting array types

Recommended Posts

I have set up a normalisation function and am ready to test it. The problem being that it currently takes in and uses int arrays. In order to be able to do the calculation I have to use a float for the sqrt function in C++;

Is there an easy way to cast from a int array[] to a float array[];


Many thanks

Share this post


Link to post
Share on other sites
The ints are for the wall positions in space. I figured ints would make it easier to draw the walls and ensure they work out correctly for collision detection with no rounding errors.

In hind site generating walls with floats seems like it may have been a better idea. I will probably just change the variables and necessary argument lists with float. Probably work out quicker and easier plus just as efficient *fingers crossed*.

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