SELECT
`id`,
`username`,
`mainpic`,
`user_last_visit`,
POW((69.172*(`long`-\"{$zipdata['long']}\")*cos({$zipdata['lat']}/57.3)),\"2\")+POW((69.172*(`lat`-\"{$zipdata['lat']}\")),\"2\") AS `distance`
FROM
`users`
In this query I know where 69.172 is coming from. But where is 57.3 coming from. If I pull this into an array $array['distance'] comes out as 85.3119036658 where I know it should be around 14.2 (according to google and yahoo maps)
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
GM wrote:Hi - 57.3 is the conversion factor between radians and degrees:
1 radian = 57.3°
Who says a degree in Maths is useless?
A degree in maths is possibly one of the most useful ones to have (opinion of course). Pretty much everything comes down to Mathematics in the end. I do remember the 360 degrees = 2 * PI radians though from A-Level (16-18 yrs).
GM wrote:Hi - 57.3 is the conversion factor between radians and degrees:
1 radian = 57.3°
Who says a degree in Maths is useless?
A degree in maths is possibly one of the most useful ones to have (opinion of course). Pretty much everything comes down to Mathematics in the end. I do remember the 360 degrees = 2 * PI radians though from A-Level (16-18 yrs).
Doing a degree in Maths will definitely improve the way one thinks. Maths and Science are the best subjects around and most of us do not realize this fact when we are younger.