<div dir="ltr">You can write this for the first thing that you want:<div><br></div><div> let vertexData: [Float] = [1.0, 0.0, 0.5, 1.0]</div><div><br></div><div>I don't know enough about 16-bit floats to comment on those.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Nov 3, 2017 at 11:26 AM nick ralabate via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I think it would be helpful for graphics programmers to specify vertex data inline without surrounding every value with Float(4.0).<div><br></div><div>Something like this:</div><div><br></div><div>let vertexData = [ 1.0f, 0.0f, 0.5f, 1.0f ]</div><div><br></div><div>Also, it would be great if Swift had a type for half-floats to match the iPhone GPU:</div><div><br></div><div>let vertexData = [ 1.0h, 0.0h, 0.5h, 1.0h]</div><div><br></div><div><br></div><div>Thanks!</div></div>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote></div>