First thing you can tell is that if you find the length of this vector, you'll find the square of the x and the square of the y.
首先你可以知道的是,如果你已有了这个矢量的模长,你就可以得到 x 和 y 分量的平方
If you give me a pair of numbers, Ax and Ay, that's as good as giving me this arrow, because I can find the length of the arrow by Pythagoras' theorem.
如果给我一组数字,Ax 和 Ay,就相当于给了我这个箭头示意图,因为我可以利用毕达哥拉斯定理定理求出模长
I've got to count my way down, which means that the access would be linear in the length of the list to find the i'th element of the list, and that's going to increase the complexity.
的位置并去访问,然后继续下去,也就意味着,找到数组中的第i个元素的方法,是关于数组的长度呈线性复杂度的,这回增加算法的复杂度。
We know it's going around in a circle because if I find the length of this vector, which is the x-square part, plus the y-square part, I just get r square at all times, because sine square plus cosine square is one.
我们之所以知道它做圆周运动,是因为我求出了这个矢量的模长,也就是 x 的平方加上 y 的平方,我就得到了它在任意时刻的模长平方,因为正弦平方加余弦平方始终等于1
应用推荐