September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -1,12 +1,12 @@
|
|||
import math, complex
|
||||
|
||||
proc rect(r, phi): Complex = (r * cos(phi), sin(phi))
|
||||
proc phase(c): float = arctan2(c.im, c.re)
|
||||
proc rect(r, phi: float): Complex = (r * cos(phi), sin(phi))
|
||||
proc phase(c: Complex): float = arctan2(c.im, c.re)
|
||||
|
||||
proc radians(x): float = (x * Pi) / 180.0
|
||||
proc degrees(x): float = (x * 180.0) / Pi
|
||||
proc radians(x: float): float = (x * Pi) / 180.0
|
||||
proc degrees(x: float): float = (x * 180.0) / Pi
|
||||
|
||||
proc meanAngle(deg): float =
|
||||
proc meanAngle(deg: openArray[float]): float =
|
||||
var c: Complex
|
||||
for d in deg:
|
||||
c += rect(1.0, radians(d))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue