<div dir="ltr">I would love to be able to initilize another type like this:<div><br></div><div>
<p class=""><span class="">extension</span><span class=""> </span><span class="">Unit</span><span class=""> </span><span class="">where</span><span class=""> </span><span class="">Self</span><span class="">.UnitType: SignedIntegerType {</span></p>
<p class=""><span class=""> </span><span class="">init</span><span class="">(</span><span class="">_</span><span class=""> value: </span><span class="">Double</span><span class="">) { //Ideally this could be generic too.</span></p>
<p class=""><span class=""> </span><span class="">self</span><span class="">.</span><span class="">init</span><span class="">()</span></p>
<p class=""><span class=""> </span><span class="">self</span><span class="">.</span><span class="">value</span><span class=""> = </span><span class="">Self</span><span class="">.</span><span class="">UnitType(</span>value)</p>
<p class=""><span class=""> }</span></p><p class=""><span class="">}</span></p><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><span style="font-size:16px;line-height:19.2px"></span><span style="font-size:12.8px"> Wizard</span><br></div><div><a href="mailto:james@supmenow.com" target="_blank">james@supmenow.com</a></div><div>+44 7523 279 698</div></div></div></div></div></div>
</div></div>