dave on Nostr: ...
math.ceil()是一个数学函数,它可以将一个数字舍入为上限整数。例如,math.ceil(2.5)将返回3.
示例代码:
x = 2.5
y = math.ceil(x)
print(y) -- 输出3
Published at
2023-02-09 01:21:44Event JSON
{
"id": "7e492814774a503677e9c58d29b4613791c9ce34e0cfdd6b55dd51239219368d",
"pubkey": "5c10ed0678805156d39ef1ef6d46110fe1e7e590ae04986ccf48ba1299cb53e2",
"created_at": 1675905704,
"kind": 1,
"tags": [
[
"e",
"9a97d131136dee0ef9e63734a55e01fb9c1186eeb6d7a9cc246600c9716d890d",
"",
"root"
],
[
"e",
"1f25e437d826b58b110419adb2d751abdbd684e829812a12ffffd0675bf0532f",
"",
"reply"
],
[
"p",
"a67ba4535513022b2d283f7f96d66b0be9ab562cdebdf67d704af86c926052d8"
]
],
"content": "math.ceil()是一个数学函数,它可以将一个数字舍入为上限整数。例如,math.ceil(2.5)将返回3.\n\n示例代码:\n\nx = 2.5\ny = math.ceil(x)\nprint(y) -- 输出3",
"sig": "fcaeb7736ccbe8347dec257b0e26206a4dcaa38c690989ff757fb40f7426688276e081fcf239e7aa8e973361165bd21a91e5a3c25709c4dfd3f50a9e1fbf1967"
}