📝 docs(tsl): restructure agent-facing reference
Rework TSL syntax, catalog, modules, and routing docs around deterministic agent lookup and generation. Split large catalog pages into focused function fact pages, remove obsolete pending/verified/unavailable paths, and update consistency tests for the new structure.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# 系统相关函数 - 随机函数
|
||||
|
||||
文档类型:函数事实页
|
||||
是否可直接用于生成代码:是;本页函数条目均包含参数表
|
||||
遇到不确定时:回到 [../system.md](../system.md)、[../../index.md](../../index.md)
|
||||
|
||||
## 随机函数
|
||||
|
||||
### `randomize()`
|
||||
|
||||
用途:随机函数相关函数。
|
||||
|
||||
参数个数:0
|
||||
返回值:处理结果
|
||||
|
||||
| 参数位置 | 参数名 | 必填 | 接收类型 | 说明 |
|
||||
| -------- | ------ | ---- | -------- | ---- |
|
||||
|
||||
### `random([value])`
|
||||
|
||||
用途:生成随机数。
|
||||
|
||||
参数个数:0 到 1
|
||||
返回值:随机实数或随机整数
|
||||
|
||||
| 参数位置 | 参数名 | 必填 | 接收类型 | 说明 |
|
||||
| -------- | ------- | ---- | -------- | -------------------- |
|
||||
| 1 | `value` | 否 | 整数 | value 为上限(可选) |
|
||||
|
||||
### `randomFrom(items)`
|
||||
|
||||
用途:从数组中随机取一个元素。
|
||||
|
||||
参数个数:1
|
||||
返回值:随机元素
|
||||
|
||||
| 参数位置 | 参数名 | 必填 | 接收类型 | 说明 |
|
||||
| -------- | ------- | ---- | -------- | -------- |
|
||||
| 1 | `items` | 是 | 数组 | 候选数组 |
|
||||
Reference in New Issue
Block a user