当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


Processing FloatList.shuffle()用法及代码示例


Processing, 类FloatList中的shuffle()用法介绍。

用法

  • .shuffle()
  • .shuffle(sketch)

返回

  • void

说明

随机化列表元素的顺序。

例子

FloatList inventory;

void setup() {
  size(200, 200);
  inventory = new FloatList();
  inventory.append(108.6);
  inventory.append(5.8);
  inventory.append(8.2);
  println(inventory);
  inventory.shuffle();
  println(inventory);
}

相关用法


注:本文由纯净天空筛选整理自processing.org大神的英文原创作品 FloatList.shuffle()。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。