Questions tagged [angle]

A shape, formed by two lines or rays diverging from a common point (the vertex).

Angle is also used to designate the measure of an angle or of a rotation. This measure is the ratio of the length of a circular arc by its radius. In the case of an angle (figure), the arc is centered at the vertex and delimited by the sides. In the case of a rotation, the arc is centered at the center of the rotation and delimited by any point and its image by the rotation.

Source: mathopenref wikipedia

1278 questions
-2
votes
1 answer

Creating a L shape in openGL

I want to create a "L" shape so bascially 2 cuboids, I can do this the long way around but want to be able to create it with the vertices method which im struglging to achieve.. Can anyone help? float vertices[8][3] = { { 0, 2, 0.5 }, {…
-2
votes
1 answer

IOS: rotate NSString with an angle

I want to rotate a NSString by an angle. but I dont want the whole string to rotate,instead I want the string head stay in the original place. How can i make NSString rotate around a certain point , but not the whole matrix rotate... OK,sorry for…
sinopec
  • 841
  • 1
  • 9
  • 16
-3
votes
1 answer

How do i shoot bullets 360* using keyboard while rotating a object in canvas?

I want my object to shoot in the direction my object is facing when it rotates or moves, any ideas on how to do it? I'm a beginner as well i started few days ago so its pretty hard on me to find the codes and to learn them as well as i cant find a…
-3
votes
1 answer

How to shoot an object, which is moving in a circle

So I have an object which is moving in a circular path and enemy in the centre of this circle. I'm trying to find out how to calculate shotingDirection for bullets. Transform.position isn't ennough since bullets will be shooted in last known object…
floati21
  • 23
  • 6
-3
votes
1 answer

Need to check if point X is in any distance from a line made between 2 dots

I am using Sourcepawn, can also understand java ,but I need just a tip, idea to work on - 2 red dots are end points of the beam. Beam can be in any angles (X,Y). I need to focus on green dot, check the closest distance between orange line (I don't…
bonk
  • 3
  • 4
-3
votes
1 answer

translate degree in canvas create linear gradient

i use canvas and i want create linear gradient in canvas with background: transparent linear-gradient(180deg, #4E69FEC7 0%, #4E69FE00 100%) 0% 0% no-repeat padding-box; this code . please help me thanks a lot
-3
votes
1 answer

Matlab - Incorrect dimensions for raising a matrix to a power

Suppose we have a=60 and B=60. I am trying to calculate this area: when I try this: W = ((u^2)* cot(B) + (v^2 * cot(a))/8; I get this error: Incorrect dimensions for raising a matrix to a power. Check that the matrix is square and the power is a…
Hadi GhahremanNezhad
  • 1,917
  • 3
  • 16
  • 37
-3
votes
1 answer

What does the comma mean in the arctan operator?

I was reading the the answers to the question about finding the angle between 2 vectors in 3D space. Signed angle between two 3D vectors with same origin within the same plane. The answer is shown here: atan2((Vb x Va) . Vn, Va . Vb) is exactly…
Astronomer
  • 109
  • 4
-3
votes
1 answer

Calculating trig functions of angles in degrees

So I found the taylor series online for calculating trig functions but as far I can tell this only works for radians, is there any way to create a similar formula and program it to calculate trig for angles in degrees without converting radians to…
-3
votes
1 answer

cardinal components to cardinal direction using arctan function

I have ocean currents data (going towards). what would be the conversion I can use? 270-(atan2(zonal,meridional)(180/pi)) or 270-(atan2(meridional,zonal)(180/)) or anything entirely different? I have gone through [this link][1] and also [eol][2]…
reddy
  • 1
-3
votes
1 answer

make Ball bounce off object edges in C

I am trying to make a ball bounce off the edges of a rectangular shaped paddle, what I have done so far, is making the ball bounce off the top edge of the paddle. But whenever the ball touches any other side (right or left), it gets stuck within the…
Yamen Tawk
  • 67
  • 2
  • 10
-3
votes
2 answers

How to convert an Integer or Float values into Degrees?

For example: float AngleAddition(float value) { float angle = value + 90; return angle; } If the value passed is 340 to this method it should return a float of value 70 which is in degree. Since 340 + 90 = 360 + 70 (360 is nothing but 0…
Karthik
  • 71
  • 1
  • 13
-3
votes
1 answer

How to make a Java Rectangle move at an angle

I'm a new game developer and I have always wondered about how would I go about making a 'Rectangle' object move at a certain angle? I thought I could make the x increase rapidly and the y increase at a delay, but how would I do that?
-3
votes
1 answer

a method to find the nearest multiple of 2pi

I need to make an efficient function that matches this footprint: public static double NearestAngle(this double currentAngle, double targetAngle); where the return value is targetAngle +/- n*2pi. The return value should minimize the absolute…
Brannon
  • 5,002
  • 2
  • 29
  • 73
-3
votes
1 answer

XNA Break the wall programming

I'm trying to create this game (break the wall) and I have a question : When the ball hits the paddle it's angle should change accordingly, but how? Any one knows and can help me? thank you!!
sagicoh
  • 105
  • 10
1 2 3
85
86