Skip to main content
gamedev.net
🔒 Locked

Simple Trig Question

Started by Wutalife37 3 replies 600+ views
Original Post
Wutalife37
Wutalife37
I'm working on a simple pong game that involves trigonometry. However, when I try to do something like sin(PI/6) it says it does not recognize sin. I'm guessing there is something I need to import, but I can't seem to find what that is. Can someone please help me?
darookie
darookie
which programming language are you using?
if it's C, #include <math.h>, in C++ #include <cmath>.

INVERSED
INVERSED
Generally you need to include math.h for the math functions like that.
Write more poetry.http://www.Me-Zine.org
Wutalife37
Wutalife37
Oh, I'm sorry. I'm using Java.

Topic Locked

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

Sign in to reply to this topic.