Google 搜索:"rand between -1 and 1 ruby" 给出 0 个结果

Google search of: "rand between -1 and 1 ruby" gives 0 results

当我搜索 Google 给我不同的方法来生成一个介于 -1 和 1 之间的随机数时:

-1 和 1 之间的随机数 ruby

它给我没有找到任何文件。有人知道为什么吗?对我来说似乎是一个基本的搜索查询。

Google 搜索中的减号运算符表示 "exclude",因此您表示 "exclude 1 and include 1",因此结果为零。

Similarly, if you want to exclude a word entirely, you can add a dash before it—like justin bieber -sucks if you want sites that only speak of Justin Bieber in a positive light.

-LifeHacker

关于您要搜索的问题,请查看此... -How to get a random number in Ruby