Questions tagged [radians]

Questions regarding angular sizes, arguments for trigonometric functions geometry etc.

Radian is a unit of angular measure. It is measured as the ratio between the length of the corresponding arc and its radius. It is often used as an argument to trigonometric function (e.g., sin, cosine etc.). It is also used as an angular measure for frquency analysis of signals (e.g., in Fourier space).

144 questions
-2
votes
1 answer

radian atan2 is showing opposite values then what they need to be

double shootx = vx + dx / t0; double shooty = vy + dy / t0; double radians = atan2((double)-shooty, shootx); deg_to_aim = (int)((radians * 360) / (2 * 3.141592653589793238462)); myprintf("(A) radians = %f deg to aim = %d\n", radians,…
SSpoke
  • 5,239
  • 8
  • 66
  • 112
-2
votes
1 answer

Math.sin incorrect results even when converted to degrees

I'm trying to use sin on a variable and I saw you can convert it by using / (Math.PI / 180) but that seems contradictory if you want to convert it to degrees.. How do I properly convert and use sin in degree form? (On an iPhone calculator, for…
Benn
  • 53
  • 1
  • 8
-2
votes
1 answer

Conversion between Rectangular and Polar Coordinates with Matlab

[X,Y] = pol2cart(-radtodeg(acos(RPF)),RCurrent); This is where my code goes wrong. I'm writing a code to find out the sending end parameters of a transmission line with given Receiving end current (RCurrent -> 2000) and power factor (RPF -> 0.8).…
-2
votes
1 answer

subtract decimal degrees (longitude readings) in php

In PHP, how to subtract $Longitude_1 = 72.8790721063599 from $Longitude_2 = 82.22? These are decimal degree values from Google geocoding. I need to find the difference and convert it into time. The time value comes close to 40 minutes as I know in…
Viktor Tango
  • 453
  • 7
  • 19
-3
votes
2 answers

How can I efficiently convert an angle (in radian) to an index from 0 to 7?

I have an angle in radian, and I'd like to convert it into a value indexed from 0 to 7 in the following manner : Note that 0 rad should fall in the middle of the sector, etc. What would be the most efficient way to do this, using simple math?
Yanick Rochon
  • 45,203
  • 21
  • 112
  • 182
-3
votes
1 answer

I am not sure how to convert degrees to radians for a variable in C#

(Please keep in mind that I am new to coding so any glaring mistakes I apologize for in advance) I am currently trying to calculate the Flight time (and eventually distance) of a ballistics cannon using velocity and angle of the cannon provided by a…
FusRoDamn
  • 1
  • 2
-3
votes
4 answers

JAVA sin() output value to radians/degrees

I have this problem: I know Math.sin(someUnknownFloatValue) output value and I really need to know how just from this single Math.sin() output find out what was that actual "someUnknownFloatNumber" that created it - is it possible, isn't there…
errerr
  • 63
  • 8
-3
votes
6 answers

Java is outputting the wrong value for a Math.tan() calculation

Here is the code from both classes, the user has to input the value for two angles and a length for part of a triangle. I understand Java uses radians, but even with a simple conversion either using Math.toDegrees or * 180/Math.Pi it still gets the…
Oli
  • 15
  • 2
  • 3
-5
votes
1 answer

Scientific Calculator in C#

I am making calculator with c# language with visual studio. I have a problem with converting radians to degrees. I'm currently doing it like this: display.Text=(Math.cos(Convert.ToDouble(display.Text)*( 180 /Math.Pi ))).ToString(); But the…
signal jobs
  • 1
  • 1
  • 4
1 2 3
9
10