MCPcopy Index your code
hub / github.com/benfry/processing4 / hasValue

Method hasValue

core/src/processing/data/DoubleList.java:399–414  ·  view source on GitHub ↗

@webref doublelist:method @brief Check if a number is a part of the list

(double value)

Source from the content-addressed store, hash-verified

397 * @brief Check if a number is a part of the list
398 */
399 public boolean hasValue(double value) {
400 if (Double.isNaN(value)) {
401 for (int i = 0; i < count; i++) {
402 if (Double.isNaN(data[i])) {
403 return true;
404 }
405 }
406 } else {
407 for (int i = 0; i < count; i++) {
408 if (data[i] == value) {
409 return true;
410 }
411 }
412 }
413 return false;
414 }
415
416
417 private void boundsProblem(int index, String method) {

Callers 1

appendUniqueMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected