PageSourceSearch

https://meteo.gr/includes/moonphase/library/degrees.js

js meteo.gr collected 2026-09-24 17:41:42 UTC 1,205 bytes, 27 lines download raw bytes

1// Extensions to the Math routines - Trig routines in degrees�
2// JavaScript by Peter Hayes http://www.peter-hayes.freeserve.co.uk/�
3// Copyright 2001-2002�
4�
5function rev(angle){return angle-Math.floor(angle/360.0)*360.0;}�
6function sind(angle){return Math.sin((angle*Math.PI)/180.0);}�
7function cosd(angle){return Math.cos((angle*Math.PI)/180.0);}�
8function tand(angle){return Math.tan((angle*Math.PI)/180.0);}�
9function asind(c){return (180.0/Math.PI)*Math.asin(c);}�
10function acosd(c){return (180.0/Math.PI)*Math.acos(c);}�
11function atan2d(y,x){return (180.0/Math.PI)*Math.atan(y/x)-180.0*(x<0);}�
12�
13function anglestring(a,circle) {�
14// returns a in degrees as a string degrees:minutes�
15// circle is true for range between 0 and 360 and false for -90 to +90�
16  var ar=Math.round(a*60)/60;�
17  var deg=Math.abs(ar);�
18  var min=Math.round(60.0*(deg-Math.floor(deg)));�
19  if (min >= 60) { deg+=1; min=0; }�
20  var anglestr="";�
21  if (!circle) anglestr+=(ar < 0 ? "-" : "+");�
22  if (circle) anglestr+=((Math.floor(deg) < 100) ? "0" : "" );�
23  anglestr+=((Math.floor(deg) < 10) ? "0" : "" )+Math.floor(deg);�
24  anglestr+=((min < 10) ? ":0" : ":" )+(min);�
25  return anglestr;�
26}�
27�

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.