<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 10, 2018, at 4:42 PM, Nate Cook <<a href="mailto:natecook@apple.com" class="">natecook@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">I don’t see how a single distribution would generate both integers and colors. Can your color type be initialized from an integer? Since the “distributions” in that playground are just sequences, you could add<span class="Apple-converted-space"> </span></span><font face="Menlo" class="" style="font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">.lazy.map({ Color(value: $0) })</font><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""><span class="Apple-converted-space"> </span>to transform an integer-producing distribution into a color-producing one. (Which is pretty cool, tbh.)</span></div></blockquote></div><br class=""><div class="">See my other email for details, but it is essentially initialized from a sequence of 2-4 UInt* (one for each axis). I usually fix all but one dimension for aesthetic reasons though, so yes-ish**.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Jon</div><div class=""><div class=""><br class=""></div><div class="">* I do mean UInt, and not UInt32 or UInt64. The amount of randomness it grabs is based on the word size of the platform, since CGFloats are as well.</div></div><div class=""><br class=""></div><div class="">** It currently naively still burns 2-4 UInt worth of randomness even if the axises are fixed, but it is ignoring 1-3 of the numbers in that case and only really using 1. I could easily optimize this without changing the interface though.</div></body></html>