公告板
版本库
filestore
活动
搜索
登录
data2
/
LocalFaceRecognition
本地人脸识别
概况
操作记录
提交次数
目录
文档
派生
对比
blame
|
历史
|
原始文档
gx
chenyc
2025-06-12
7b72ac13a83764a662159d4a49b7fffb90476ecb
[data2/LocalFaceRecognition.git]
/
node_modules
/
@vladmandic
/
face-api
/
src
/
ops
/
shuffleArray.ts
1
2
3
4
5
6
7
8
9
10
export function shuffleArray(inputArray: any[]) {
const array = inputArray.slice();
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
const x = array[i];
array[i] = array[j];
array[j] = x;
}
return array;
}