dolphin.spatial3d · recipe ·

Give a point three coordinates

Read X, Y, and Z without needing a giant maths lesson.

cpudolphin.mathdolphin.spatial3drecipe

A location on paper needs two numbers. A location in a room needs three. Vector3 stores X, Y, and Z together. In Crystal Garden, X and Z describe the ground and Y describes height. The origin is (0, 0, 0), a chosen reference point. Negative coordinates are useful: a crystal can sit to either side of the center. You choose what a world unit means in your game.

start.yh

Status: complete-program

Give a point three coordinates

Read X, Y, and Z without needing a giant maths lesson.

cpu · type checked

using dolphin.math
using dolphin.spatial3d

Vector3 start = Vector3(0.0, 0.0, 0.0)
Vector3 target = Vector3(3.0, 4.0, 0.0)
Console.Log(Text.From(DolphinDistance3(start, target)))
project.mech
manifestVersion = "2"
package = "api.example.recipe__space"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"

[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"
Expected output
5
Notes and source

Change the target to (0, 0, 5). Then compare the result with the original target.

demonhunterlabs/app/lib/yeho-walkthrough.ts