threejs求两个向量的夹角

threejs求两个向量的夹角

 

var v1 = new THREE.Vector3(1,0,0);
var v2 = new THREE.Vector3(0,1,0);
var angle1 = v1.angleTo(v2);  //
var angle2 = v2.angleTo(v1);  //

console.log(angle1);
console.log(angle2);

 

1.5707963267948966
1.5707963267948966

 

 

#######################

posted @ 2022-05-27 20:11  西北逍遥  阅读(1034)  评论(0编辑  收藏  举报