<divclass="content sourceset-depenent-content"data-active=""data-togglable=":kmath-core:dokkaHtmlPartial/commonMain"><divclass="symbol monospace"><spanclass="token keyword">inline </span><spanclass="token keyword">fun </span><ahref="-double-buffer.html"><spanclass="token function">DoubleBuffer</span></a><spanclass="token punctuation">(</span>size<spanclass="token operator">: </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><spanclass="token punctuation">, </span>init<spanclass="token operator">: </span><spanclass="token punctuation">(</span><spanclass="token keyword"></span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><spanclass="token punctuation">)</span><spanclass="token operator"> -></span><spanclass="token keyword"></span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html">Double</a><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="-double-buffer/index.html">DoubleBuffer</a><spanclass="top-right-position"><spanclass="copy-icon"></span><divclass="copy-popup-wrapper popup-to-left"><spanclass="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><pclass="paragraph">Creates a new <ahref="-double-buffer/index.html">DoubleBuffer</a> with the specified <ahref="-double-buffer.html">size</a>, where each element is calculated by calling the specified <ahref="-double-buffer.html">init</a> function.</p><pclass="paragraph">The function <ahref="-double-buffer.html">init</a> is called for each array element sequentially starting from the first one. It should return the value for a buffer element given its index.</p><br><divclass="symbol monospace"><spanclass="token keyword"></span><spanclass="token keyword">fun </span><ahref="-double-buffer.html"><spanclass="token function">DoubleBuffer</span></a><spanclass="token punctuation">(</span><spanclass="token keyword">vararg </span>doubles<spanclass="token operator">: </span><ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html">Double</a><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="-double-buffer/index.html">DoubleBuffer</a><spanclass="top-right-position"><spanclass="copy-icon"></span><divclass="copy-popup-wrapper popup-to-left"><spanclass="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><pclass="paragraph">Returns a new <ahref="-double-buffer/index.html">DoubleBuffer</a> of given elements.</p></div></div>