Skip to the content

Meikyuu迷宮

Generate seeded mazes and arrow puzzles, follow numbered levels, and play on flat grids or three-dimensional surfaces.

Meikyuu is the Japanese word 迷宮 for labyrinth. About the name

Contents

Reference · Surface maze rules and geometry

quatSlerpfunction

Halfway (or any share) from one rotation to another along the shortest way.

Import it

import { quatSlerp } from "@johnmorrisdotca/meikyuu/3d";

Definition

function quatSlerp(a: Quat, b: Quat, t: number): Quat

Parameters

NameTypeDescription
aQuat

The first quaternion or vector specified by the signature.

bQuat

The second quaternion or vector specified by the signature.

tnumber

The interpolation share from 0 to 1.

Returns

Quat

Halfway (or any share) from one rotation to another along the shortest way.

Examples

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 ]

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/meikyuu 3.2.0.