quatSlerp関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Halfway (or any share) from one rotation to another along the shortest way.
インポート
import { quatSlerp } from "@johnmorrisdotca/meikyuu/3d";
定義
function quatSlerp(a: Quat, b: Quat, t: number): Quat
引数
| 名前 | 型 | 説明 |
|---|---|---|
a | Quat | The first quaternion or vector specified by the signature. |
b | Quat | The second quaternion or vector specified by the signature. |
t | number | The interpolation share from 0 to 1. |
戻り値
Quat
Halfway (or any share) from one rotation to another along the shortest way.
例
import type { Quat } from "@johnmorrisdotca/meikyuu/3d";
import { quatAxisAngle, quatSlerp } from "@johnmorrisdotca/meikyuu/3d";
const q: Quat = [0,0,0,1];
console.log(quatSlerp(q,quatAxisAngle([0,1,0],Math.PI/4),0.5));[ 0, 0.19509032201612825, 0, 0.9807852804032302 ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。