You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
322 B
18 lines
322 B
|
4 months ago
|
/**
|
||
|
|
* 计算二维向量的垂直向量
|
||
|
|
* @param out
|
||
|
|
* @param v
|
||
|
|
* @param flag
|
||
|
|
*/
|
||
|
|
export function vertical(out, v, flag) {
|
||
|
|
if (flag) {
|
||
|
|
out[0] = v[1];
|
||
|
|
out[1] = -1 * v[0];
|
||
|
|
}
|
||
|
|
else {
|
||
|
|
out[0] = -1 * v[1];
|
||
|
|
out[1] = v[0];
|
||
|
|
}
|
||
|
|
return out;
|
||
|
|
}
|
||
|
|
//# sourceMappingURL=vertical.js.map
|