```json
{
  "title": "通用戏法",
  "icon": "minecraft:repeater",
  "category": "trickster-math-tricks:math-tricks"
}
```

本节的戏法在功能上可能与戏法师已有的戏法较为相似，但它们支持的类型更多。

;;;;;

<|glyph@trickster-math-tricks:templates|trick-id=trickster-math-tricks:extract_x,title=甲元之曲变|>

vector | quaternion -> number

---

返回所给法术片段的X分量。

;;;;;

<|glyph@trickster-math-tricks:templates|trick-id=trickster-math-tricks:extract_y,title=乙元之曲变|>

vector | quaternion -> number

---

返回所给法术片段的Y分量。

;;;;;

<|glyph@trickster-math-tricks:templates|trick-id=trickster-math-tricks:extract_z,title=丙元之曲变|>

vector | quaternion -> number

---

返回所给法术片段的Z分量。

;;;;;

<|glyph@trickster-math-tricks:templates|trick-id=trickster-math-tricks:extract_w,title=丁元之曲变|>

quaternion -> number

---

返回所给法术片段的W分量。

;;;;;

<|glyph@trickster-math-tricks:templates|trick-id=trickster-math-tricks:normalize,title=归一之曲变|>

quaternion | vector -> quaternion | vector

---

将所给法术片段归一化至长度为一。

;;;;;

<|glyph@trickster-math-tricks:templates|trick-id=trickster-math-tricks:magnitude,title=模长之曲变|>

quaternion | vector -> number

---

返回所给法术片段的长度。

;;;;;

<|glyph@trickster-math-tricks:templates|trick-id=trickster-math-tricks:squared_magnitude,title=模方之曲变|>

quaternion | vector -> number

---

返回所给法术片段长度的平方。