fix: vec min function (#702)

This commit is contained in:
Peng Xiao 2022-06-02 01:49:16 +08:00 committed by GitHub
parent b47fb729ee
commit 87692eb7fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -515,7 +515,7 @@ export class Vec {
* Get a vector comprised of the minimum of two or more vectors.
*/
static min = (...v: number[][]) => {
return [Math.max(...v.map((a) => a[0])), Math.max(...v.map((a) => a[1]))]
return [Math.min(...v.map((a) => a[0])), Math.min(...v.map((a) => a[1]))]
}
}