Is is saying, do these things point to exactly the same spot in memory, the same instance.
指向内存中的同一位置,同一个实例,深意义上的相等。
The same instance.
内存中的同一位置。
He says, "to succeed in many things or many times is 'difficult.' For instance, to repeat the same throw of dice 10,000 times would be impossible; whereas, to make it once or twice is comparatively easy."
他说,要成就很多事情,或成就一件事情很多次,是很困难的,比如,掷一万次骰子都得到同样的结果,是不可能的,但是,掷一两次却是相对容易的
And this is useful because if you're actually writing a program that's interactive or that you want to change overtime much like you would a game, hopefully, the game is not going to have the bad guys, for instance, always standing in the same place or the rocks or whatever it is falling from the sky in the same place 'cause it would very quickly become a very tedious game.
这是很有用的,因为如果,写一个交互的程序或者,希望每次游戏都不一样,我们希望,游戏中的坏人物,别老是站在同一个地方或者同一块石头上,或者从天空中同样的位置落下,因为这立刻会使游戏变得乏味。
And then from that start point, get the x-value. Same thing, from that instance, get the endpoint, from that end point get the x-value, square.
取得结束点,然后取得结束点的y坐标,然后求差开平方,然后同样求的y坐标。
Did the same thing with c p 2, 2 2 0 Again, remind you, c p 2 is a different instance of this data type.
建立了一个x变量,我也把它赋值为,因此cp1内置有了x和y值,然后对cp2做同样的操作。
应用推荐