Java Number Range Check inRange(double x, double y, double z, double sx, double sy, double sz, double r)

Here you can find the source of inRange(double x, double y, double z, double sx, double sy, double sz, double r)

Description

in Range

License

Open Source License

Declaration

public static boolean inRange(double x, double y, double z, double sx,
            double sy, double sz, double r) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static boolean inRange(double x, double y, double z, double sx,
            double sy, double sz, double r) {
        return (((x - sx) * (x - sx)) + ((y - sy) * (y - sy)) + ((z - sz) * (z - sz))) <= (r * r);
    }//from   w w  w. ja  va  2  s.c  o m
}

Related

  1. inRange(double query, double min, double max)
  2. inRange(double value, double lower, double upper)
  3. inRange(double value, double min, double max)
  4. inRange(double value, double min, double max)
  5. inRange(double value, double target, double range)
  6. inRange(E element, E min, E max)
  7. inRange(final float testNum, final float min, final float max)
  8. inRange(final int id, final int min, final int max)
  9. inRange(final int value, final int min, final int max)