• Advertisement

Archived

This topic is now archived and is closed to further replies.

float Question

This topic is 5924 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When setting objects such as lights the coordinates are given in float values (ie 1.0f). What exactly does 1.0f = ? example:
  
struct VERTEX
{
    float x, y, z;
    float nx, ny, nz; // normals

};

// and i use VERTEX like this to create a triangle

VERTEX Vertices[] =
{
    { -2.0f, -2.0f, 0.0f, -1.0f, 0.0f, 0.0f },
    { 2.0f, -2.0f, 0.0f, 1.0f, 0.0f, 0.0f },
    { 0.0f, 2.0f, 0.0f, 0.0f, 1.0f, 0.0f },
}
  
When I draw the triangle, its pretty big. So if anyone could explain it to me or point me in a direction I''d appericiate it.

Share this post


Link to post
Share on other sites
Advertisement
1.0f == 1.0f

Seriously, how big your triangle appears depends on where you are looking at it from. The scale itself it entirely arbitrary.

1.0f could be 1 m or 1 AU or even 1 fnord.

Share this post


Link to post
Share on other sites

  • Advertisement