Skip to content

Commit

Permalink
🩹 変更忘れを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenCMD committed Oct 31, 2024
1 parent d7aaad2 commit 73d1738
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions TheSkyBlessing/data/lib/functions/array/math/max.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
execute store success score $isNumeric Temporary run data get storage lib: Array[-1] 1
# 最大値を計算する
function lib:array/core/math/max
# 総和をSumResultに突っ込む
execute if score $isNumeric Temporary matches 0 store result storage lib: SumResult int 1.00 run scoreboard players get $Max Temporary
execute if score $isNumeric Temporary matches 1 store result storage lib: SumResult double 0.01 run scoreboard players get $Max Temporary
# 総和をMaxResultに突っ込む
execute if score $isNumeric Temporary matches 0 store result storage lib: MaxResult int 1.00 run scoreboard players get $Max Temporary
execute if score $isNumeric Temporary matches 1 store result storage lib: MaxResult double 0.01 run scoreboard players get $Max Temporary
# リセット
scoreboard players reset $Max Temporary
scoreboard players reset $Temp Temporary
Expand Down
8 changes: 4 additions & 4 deletions TheSkyBlessing/data/lib/functions/array/math/min.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# storage lib: Array: [T]
# 配列データ
# @output
# storage lib: MaxResult: T extends Numeric ? double : int
# storage lib: MinResult: T extends Numeric ? double : int
# 最小値
# @api

Expand All @@ -23,9 +23,9 @@
execute store success score $isNumeric Temporary run data get storage lib: Array[-1] 1
# 最小値を計算する
function lib:array/core/math/min
# 総和をSumResultに突っ込む
execute if score $isNumeric Temporary matches 0 store result storage lib: SumResult int 1.00 run scoreboard players get $Min Temporary
execute if score $isNumeric Temporary matches 1 store result storage lib: SumResult double 0.01 run scoreboard players get $Min Temporary
# 総和をMinResultに突っ込む
execute if score $isNumeric Temporary matches 0 store result storage lib: MinResult int 1.00 run scoreboard players get $Min Temporary
execute if score $isNumeric Temporary matches 1 store result storage lib: MinResult double 0.01 run scoreboard players get $Min Temporary
# リセット
scoreboard players reset $Min Temporary
scoreboard players reset $Temp Temporary
Expand Down

0 comments on commit 73d1738

Please sign in to comment.