Tin

Examples · learn/13-modules · 189 of 339

arm

examples/learn/13-modules/arm.tintin run examples/learn/13-modules/arm.tin
import "./lib/joints.tin"
import "./lib/report.tin"

fn main() {
  let arm = [
    Joint { name: "shoulder", angle: 1.2, limit: 1.6 },
    Joint { name: "elbow", angle: -2.4, limit: 2.1 },
    Joint { name: "wrist", angle: 3.0, limit: 2.8 },
  ]
  print(report(arm))
  print(report([arm[0]]))
}