stepTurn関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A turn about the viewer's own axes: right radians about the vertical (the solid's near side moves right) and down about the horizontal.
インポート
import { stepTurn } from "@johnmorrisdotca/meikyuu/3d";
定義
function stepTurn(q: Quat, right: number, down: number): Quat
引数
| 名前 | 型 | 説明 |
|---|---|---|
q | Quat | The current normalized rotation quaternion. |
right | number | The horizontal view rotation in radians. |
down | number | The vertical view rotation in radians. |
戻り値
Quat
A turn about the viewer's own axes: right radians about the vertical (the solid's near side moves right) and down about the horizontal.
例
import type { Quat } from "@johnmorrisdotca/meikyuu/3d";
import { stepTurn } from "@johnmorrisdotca/meikyuu/3d";
const q: Quat = [0,0,0,1];
console.log(stepTurn(q,0.1,0));[ 0, 0.04997916927067833, 0, 0.9987502603949663 ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。