Files
rexlang/examples/modules/geometry.rex
T
Your NameandClaude Opus 5.5 7cf9727bcd Rename the language from Dino to Rex
Files use .rex, the command is rex, and the crate, runtime prefixes,
docs, editor files and examples all use the new name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:51:23 +01:00

14 lines
342 B
Rexx

// A module: everything marked `pub` can be used by the file that imports it.
import math
pub const UNIT = 1.0
pub struct Point {
pub x, y: float
pub func dist(other: Point): float {
return math.sqrt((x - other.x) * (x - other.x) + (y - other.y) * (y - other.y))
}
}
pub func origin(): Point { return Point{0.0, 0.0} }