Skip to content

Commit

Permalink
「MAX」「MIN」のエイリアスは日本語名の命令を呼び出すように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
kyad committed Jan 5, 2025
1 parent 482f958 commit d67587b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions core/src/plugin_system.mts
Original file line number Diff line number Diff line change
Expand Up @@ -582,9 +582,8 @@ export default {
isVariableJosi: true,
pure: true,
fn: function (b: number, ...a: any): number {
a.pop() // 必ず末尾に sys があるので、末尾のシステム変数を除外
a.push(b)
return a.reduce((p: number, c: number) => Math.max(p, c))
const sys = a.pop()
return sys.__exec('最大値', [b, ...a, sys])
}
},
'最大値': { // @2個以上の数値のうち最大値を返す。// @さいだいち
Expand All @@ -604,9 +603,8 @@ export default {
isVariableJosi: true,
pure: true,
fn: function (b: number, ...a: any): number {
a.pop() // 必ず末尾に sys があるので、末尾のシステム変数を除外
a.push(b)
return a.reduce((p: number, c: number) => Math.min(p, c))
const sys = a.pop()
return sys.__exec('最小値', [b, ...a, sys])
}
},
'最小値': { // @2個以上の数値のうち最小値を返す。// @さいしょうち
Expand Down

0 comments on commit d67587b

Please sign in to comment.