private int translatePoint (LuaCallFrame callFrame, int nArguments) {
        BaseLib.luaAssert(nArguments >= 3, "insufficient arguments for TranslatePoint");
        ZonePoint z = (ZonePoint)callFrame.get(0);
        double dist = LuaState.fromDouble(callFrame.get(1));
        double angle = LuaState.fromDouble(callFrame.get(2));
        callFrame.push(z.translate(angle, dist));
        return 1;
    }
Distance object's fake GetValue or __call method

Called from Lua code: dist:GetValue("metres") or dist("ft"),
where 'dist' is double, converts the number to specified units
and returns as double.
main/src/main/java/cgeo/geocaching/wherigo/openwig/WherigoLib.java