File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 237237
238238### 算数函数 (Math functions)
239239
240- ceil( @ number )
240+ #### ceil
241241
242242向上取整。
243243
244- 参数:
244+ 参数:
245245
246- @number : 浮点数 (A floating point number.)
247- 返回值:整数 (integer)
246+ - 数字:浮点数
247+
248+ 返回值:向上取整后的整数
248249
249250例如:
250251
251- ceil(2.4)
252+ ceil(2.4)
253+
252254输出:
253255
254- 3
255- floor(@number )
256+ 3
257+
258+ #### floor
256259
257260向下取整。
258261
259- 参数:
262+ 参数:
260263
261- @ number : 浮点数 (A floating point number.)
262- 返回值:整数 (integer)
264+ - 数字: 浮点数
265+ - 返回值:向下取整后的整数
263266
264267例如:
265268
266- floor(2.6)
269+ floor(2.6)
270+
267271输出:
268272
269- 2
270- percentage(@number )
273+ 2
274+
275+ #### percentage
271276
272- 将浮点数 (A floating point number) 转换为百分比字符串 (percentage string) 。
277+ 将浮点数转换为百分比字符串 。
273278
274279参数:
275280
276- @number : 浮点数 (A floating point number.)
277- 返回值:字符串 (string)
281+ - 数字:浮点数
282+
283+ 返回值:字符串
278284
279285例如:
280286
281- percentage(0.5)
287+ percentage(0.5)
288+
282289输出:
283290
284- 50%
285- round(number, [ places: 0] )
291+ 50%
292+
293+ #### round(number, [ places: 0] )
286294
287295四舍五入取整。
288296
289297参数:
290298
291- @number : 浮点数 (A floating point number.)
292- @decimalPlaces : 可选:四舍五入取整的小数点位置,默认值 0。
299+ - 数字:浮点数
300+ - 小数位数:数字,可选,四舍五入取整的小数点位置,默认值为0。
301+
293302返回值:数字 (number)
294303
295304例如:
296305
297- round(1.67)
306+ round(1.67)
307+
298308输出:
299309
300- 2
310+ 2
311+
301312例如:
302313
303- round(1.67, 1)
314+ round(1.67, 1)
315+
304316输出:
305317
306- 1.7
307- 颜色函数 (Color functions)
318+ 1.7
319+
320+ ### 颜色函数 (Color functions)
308321
309322颜色解释 (Color definition)
310323
@@ -1117,55 +1130,6 @@ Color 1 Color 2 Color 3
11171130
11181131
11191132
1120- Math functions
1121-
1122- ceil
1123-
1124- Rounds up to the next highest integer.
1125-
1126- Parameters:
1127-
1128- number: A floating point number.
1129- Returns: integer
1130-
1131- Example:
1132-
1133- ceil(2.4)
1134- Output:
1135-
1136- 3
1137- floor
1138-
1139- Rounds down to the next lowest integer.
1140-
1141- Parameters:
1142-
1143- number: A floating point number.
1144- Returns: integer
1145-
1146- Example:
1147-
1148- floor(2.6)
1149- Output:
1150-
1151- 2
1152- percentage
1153-
1154- Converts a floating point number into a percentage string.
1155-
1156- Parameters:
1157-
1158- number: A floating point number.
1159- Returns: string
1160-
1161- Example:
1162-
1163- percentage(0.5)
1164- Output:
1165-
1166- 50%
1167- round
1168-
11691133Applies rounding.
11701134
11711135Parameters:
You can’t perform that action at this time.
0 commit comments