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).

169 questions
-1
votes
3 answers

How to convert points to radians in Objective-C?

In my app I'm using UIBezierPath to draw an arc into a circle. I'm trying to correlate a number to radians. So let's say a user has a certain number of points, and the points are capped at 100 points. I want 100 points to be 360 degrees. I want the…
Faisal Syed
  • 921
  • 1
  • 11
  • 25
-1
votes
4 answers

Convert standard 360-degree to atan2

I need to reverse calculation of standard 360 angle to atan2. It's my standard angle calulation Standard angle = (int) Math.toDegrees(Math.atan2(y,x)); if(angle < 0) angle += 360; I need Math.atan2 value from angle how to achieve that.
sabish
  • 31
  • 1
  • 8
-1
votes
1 answer

Java get cos or sin of angle

I have the folling: double angle = 0.0; double rad = Math.toRadians(angle); double sinIs = Math.sin(rad); double cosIs = Math.cos(rad); I would expect the result to be: rad=0.0 sinIs=0 cosIs=1 However the return Math.toRadians(0.0) will…
octavio
  • 456
  • 4
  • 14
-1
votes
1 answer

Web Mercator formulas spitting out blatantly incorrect values

EDIT: I simply forgot to convert degrees to radians. I've been trying to convert some latitude and longitude coordinates to Web Mercator pixel form, and the formulas listed on wikipedia are spitting out blatantly incorrect values. Wikipedia says…
NAME__
  • 625
  • 1
  • 7
  • 17
-1
votes
1 answer

2 Different Radians constant calculations what's the difference?

Most commonly I see in programs that convert radians to degrees and degrees to radians for trigonometry people always use two different ways to get the radian constant. double PI = 3.14159265358979; double Radians = (2 * PI) / 360; Most commonly I…
SSpoke
  • 5,656
  • 10
  • 72
  • 124
-1
votes
1 answer

Radians error message with Lat / Lon calculation

I'm creating a website with an events calendar where users search by location (lon/lat) and I found this online which has a calculation but I keep getting the error: Fatal error: Call to undefined function RADIANS() in ... Why I may be getting…
-1
votes
1 answer

SELECT RADIANS(47) vs SELECT RADIANS(47.0)

Ran into this issue with a Store Locator that I'm building. The Radians function returns a Zero (0) when executing SELECT RADIANS(47), but it returns 0.83... when executing SELECT RADIANS(47.0). The ending result is causing the distance calculated…
-1
votes
2 answers

Sine to radians Objective-C

This part of an app that I am working on, I have the following equation in objective C. All variables are floats. r is a sine of an angle and I would like to convert r to radians when diplayed in the text field. r = ns/ni r = sinf(r); rr =…
MacUser
  • 492
  • 9
  • 22
-2
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
  • 51,409
  • 25
  • 133
  • 214
-2
votes
1 answer

how to make a script converting to radians the degree,seconds,minutes?

I am using python and I am having trouble making a script converting an angle with the degree,minutes,seconds given in radiant. I already tried a few things but I am pretty new so I need help
-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,656
  • 10
  • 72
  • 124
-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
  • 55
  • 1
  • 1
  • 8
-2
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
  • 11
  • 2
-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
  • 9
  • 19
1 2 3
11
12