<divclass="platform-hinted "data-platform-hinted="data-platform-hinted"><divclass="content sourceset-depenent-content"data-active=""data-togglable=":kmath-complex:dokkaHtml/commonMain"><divclass="symbol monospace">inline fun <spandata-unresolved-link="space.kscience.kmath.structures/Buffer.Companion///PointingToDeclaration/">Buffer.Companion</span>.<ahref="quaternion.html">quaternion</a>(size: <ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>, init: (<ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>) -><ahref="-quaternion/index.html">Quaternion</a>): <spandata-unresolved-link="space.kscience.kmath.structures/Buffer///PointingToDeclaration/">Buffer</span><<ahref="-quaternion/index.html">Quaternion</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><divclass="symbol monospace">inline fun <spandata-unresolved-link="space.kscience.kmath.structures/MutableBuffer.Companion///PointingToDeclaration/">MutableBuffer.Companion</span>.<ahref="quaternion.html">quaternion</a>(size: <ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>, init: (<ahref="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>) -><ahref="-quaternion/index.html">Quaternion</a>): <spandata-unresolved-link="space.kscience.kmath.structures/MutableBuffer///PointingToDeclaration/">MutableBuffer</span><<ahref="-quaternion/index.html">Quaternion</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></div></div>
</div>
<pclass="paragraph">Creates a new buffer of quaternions with the specified <spandata-unresolved-link="space.kscience.kmath.complex//size/#/PointingToCallableParameters(-1)/">size</span>, where each element is calculated by calling the specified <spandata-unresolved-link="space.kscience.kmath.complex//init/#/PointingToCallableParameters(-1)/">init</span> function.</p></div>