Elm Exactly

Basis entryBasics.fromPolar

A value of Basics. Its type is in Section C.3 Basics.

Static basis

var ↦ (σ,is)fromPolar ↦ ((Float,Float)Tuple2→(Float,Float)Tuple2,v)\begin{array}{|rcl|}\hline \var {\ }& \mapsto {\ }& (\sigma, \is)\\\hline \href{/standard/basis/Basics/fromPolar}{\kw{fromPolar}} {\ }& \mapsto {\ }& ((\tFloat, \tFloat)\tTuple{2} \rightarrow (\tFloat, \tFloat)\tTuple{2}, \isv)\\\hline\end{array}
Figure 39: Static VE\VE of ME0(Basics)\ME_0(\kw{Basics}): Floating-point Functions and Function Helpers

Dynamic basis

var or con ↦ varityfromPolar, toPolar ↦ Elm\begin{array}{|rclc|}\hline \var\ \text{or}\ \con {\ }& \mapsto {\ }& v {\qquad}& \arity\\\hline \href{/standard/basis/Basics/fromPolar}{\kw{fromPolar}},\ \href{/standard/basis/Basics/toPolar}{\kw{toPolar}} {\ }& \mapsto {\ }& \text{Elm} {\qquad}& \\\hline\end{array}
Figure 45: Dynamic VE\VE of ME0(Basics)\ME_0(\kw{Basics})

Its text in Elm

fromPolar (radius, theta) =
  ( mul radius (cos theta)
  , mul radius (sin theta)
  )
Figure 48: The Values of Basics Written in Elm
Read it in its chapter·Permanent address: /standard/basis/Basics/fromPolar

Tests (0)

No test of the suite checks this entry of the basis yet.

Discussions

Discuss this basis entry·Search the discussions on GitHub

Discussions are on GitHub; one about this basis entry has [b:Basics.fromPolar] in its title.

A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.