Skip to main content
gamedev.net
🔒 Locked

syntax

Started by beginnerfurqan 2 replies 600+ views
Original Post
beginnerfurqan
beginnerfurqan
hi, does anyone know how I can write the following in OpenGL syntax? sqrt((x^2) + (y^2)) thanx.
Zakwayda
Zakwayda
Quote:
Original post by beginnerfurqan
hi,

does anyone know how I can write the following in OpenGL syntax?

sqrt((x^2) + (y^2))

thanx.
That has nothing to do with OpenGL, but the answer is to use the C++ pow() function, or (probably better) just write it out longhand:
sqrt(x*x + y*y);
Kalasjniekof
Kalasjniekof
hi beginnerfurqan, don't take this wrong, but i think you've moved to opengl a bit too early. most of your questions relate to basic cpp programming, not to the opengl api. try following some basic cpp tutorials first (or read a book) as this will really help you in determining what is 'cpp' and what is 'opengl'.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.