<div dir="ltr">While FloatingPointType can be initialized from various Int type variants, it seems to be missing an initializer from Double/Float. Similarly, there are no initializers from FloatingPointType to Double/Float. Is this intentional?<br><br>I&#39;ve tried implementing the following:<br><br>// <a href="https://en.wikipedia.org/wiki/Window_function#Tukey_window">https://en.wikipedia.org/wiki/Window_function#Tukey_window</a><div>public func tukeyWindowFunc(index: Int, N: Int) -&gt; Double {<br>    let L = N/8<br>    let indexAbs = min(index, N-1-index)<br>    if indexAbs &gt;= L {<br>        return 1.0<br>    }<br>    else {<br>        let r = Double(indexAbs) / Double(L)<br>        return 0.5*(1.0 + cos(M_PI * (r - 1.0)))<br>    }<br>}<br><br>extension Array where Element: FloatingPointType {<br>    public func tukeyWindowArray() -&gt; [Element] {<br>        return (0..&lt;count).map{self[$0] * tukeyWindowFunc($0, N: count)}<br>    }<br>}<br><br>The extension failed to compile no matter how I spun it, since Double and FloatingPointType can&#39;t multiply each other and neither type can be cast to the other.<div><br></div><div>I would settle for extending just Array&lt;Double&gt;, but that isn&#39;t supported yet either ;)</div><div><br></div><div>Cheers,</div><div>Dan</div></div></div>