test_class.file: display/renderbasic/src/test/java/org/openscience/cdk/renderer/generators/standard/VecmathUtilTest.java
test_class.identifier: VecmathUtilTest
test_case.body: @Test
      public void testNewUnitVectors() throws Exception {
          IAtom fromAtom = mock(IAtom.class);
          IAtom toAtom1 = mock(IAtom.class);
          IAtom toAtom2 = mock(IAtom.class);
          IAtom toAtom3 = mock(IAtom.class);
          when(fromAtom.getPoint2d()).thenReturn(new Point2d(4, 2));
          when(toAtom1.getPoint2d()).thenReturn(new Point2d(-5, 3));
          when(toAtom2.getPoint2d()).thenReturn(new Point2d(6, -4));
          when(toAtom3.getPoint2d()).thenReturn(new Point2d(7, 5));
          List<Vector2d> vectors = VecmathUtil.newUnitVectors(fromAtom, Arrays.asList(toAtom1, toAtom2, toAtom3));
  
          assertThat(vectors.size(), is(3));
          assertThat(vectors.get(0).x, closeTo(-0.993, 0.01));
          assertThat(vectors.get(0).y, closeTo(0.110, 0.01));
          assertThat(vectors.get(1).x, closeTo(0.316, 0.01));
          assertThat(vectors.get(1).y, closeTo(-0.948, 0.01));
          assertThat(vectors.get(2).x, closeTo(0.707, 0.01));
          assertThat(vectors.get(2).y, closeTo(0.707, 0.01));
      }
test_case.class_method_signature: VecmathUtilTest.testNewUnitVectors()
test_case.full_signature: @Test public void testNewUnitVectors()
test_case.identifier: testNewUnitVectors
test_case.invocations: mock mock mock mock thenReturn when getPoint2d thenReturn when getPoint2d thenReturn when getPoint2d thenReturn when getPoint2d newUnitVectors asList assertThat size is assertThat get closeTo assertThat get closeTo assertThat get closeTo assertThat get closeTo assertThat get closeTo assertThat get closeTo
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNewUnitVectors()
focal_class.declarator: TAU = 2 * Math.PI
focal_class.modifier: private final static
focal_class.original_string: private final static double TAU = 2 * Math.PI;
focal_class.type: double
focal_class.var_name: TAU
focal_class.file: display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/VecmathUtil.java
focal_class.identifier: VecmathUtil
focal_class.class_method_signature: VecmathUtil.VecmathUtil()
focal_class.full_signature: private  VecmathUtil()
focal_class.identifier: VecmathUtil
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  VecmathUtil()
focal_class.class_method_signature: VecmathUtil.toAwtPoint(Point2d point)
focal_class.full_signature: static Point2D toAwtPoint(Point2d point)
focal_class.identifier: toAwtPoint
focal_class.modifiers: static
focal_class.parameters: (Point2d point)
focal_class.return: Point2D
focal_class.signature: Point2D toAwtPoint(Point2d point)
focal_class.class_method_signature: VecmathUtil.toVecmathPoint(Point2D point)
focal_class.full_signature: static Point2d toVecmathPoint(Point2D point)
focal_class.identifier: toVecmathPoint
focal_class.modifiers: static
focal_class.parameters: (Point2D point)
focal_class.return: Point2d
focal_class.signature: Point2d toVecmathPoint(Point2D point)
focal_class.class_method_signature: VecmathUtil.newUnitVector(final Tuple2d from, final Tuple2d to)
focal_class.full_signature: static Vector2d newUnitVector(final Tuple2d from, final Tuple2d to)
focal_class.identifier: newUnitVector
focal_class.modifiers: static
focal_class.parameters: (final Tuple2d from, final Tuple2d to)
focal_class.return: Vector2d
focal_class.signature: Vector2d newUnitVector(final Tuple2d from, final Tuple2d to)
focal_class.class_method_signature: VecmathUtil.newUnitVector(final IAtom atom, final IBond bond)
focal_class.full_signature: static Vector2d newUnitVector(final IAtom atom, final IBond bond)
focal_class.identifier: newUnitVector
focal_class.modifiers: static
focal_class.parameters: (final IAtom atom, final IBond bond)
focal_class.return: Vector2d
focal_class.signature: Vector2d newUnitVector(final IAtom atom, final IBond bond)
focal_class.class_method_signature: VecmathUtil.newUnitVectors(final IAtom fromAtom, final List<IAtom> toAtoms)
focal_class.full_signature: static List<Vector2d> newUnitVectors(final IAtom fromAtom, final List<IAtom> toAtoms)
focal_class.identifier: newUnitVectors
focal_class.modifiers: static
focal_class.parameters: (final IAtom fromAtom, final List<IAtom> toAtoms)
focal_class.return: List<Vector2d>
focal_class.signature: List<Vector2d> newUnitVectors(final IAtom fromAtom, final List<IAtom> toAtoms)
focal_class.class_method_signature: VecmathUtil.newPerpendicularVector(final Vector2d vector)
focal_class.full_signature: static Vector2d newPerpendicularVector(final Vector2d vector)
focal_class.identifier: newPerpendicularVector
focal_class.modifiers: static
focal_class.parameters: (final Vector2d vector)
focal_class.return: Vector2d
focal_class.signature: Vector2d newPerpendicularVector(final Vector2d vector)
focal_class.class_method_signature: VecmathUtil.midpoint(Point2d a, Point2d b)
focal_class.full_signature: static Point2d midpoint(Point2d a, Point2d b)
focal_class.identifier: midpoint
focal_class.modifiers: static
focal_class.parameters: (Point2d a, Point2d b)
focal_class.return: Point2d
focal_class.signature: Point2d midpoint(Point2d a, Point2d b)
focal_class.class_method_signature: VecmathUtil.scale(final Tuple2d vector, final double factor)
focal_class.full_signature: static Vector2d scale(final Tuple2d vector, final double factor)
focal_class.identifier: scale
focal_class.modifiers: static
focal_class.parameters: (final Tuple2d vector, final double factor)
focal_class.return: Vector2d
focal_class.signature: Vector2d scale(final Tuple2d vector, final double factor)
focal_class.class_method_signature: VecmathUtil.sum(final Tuple2d a, final Tuple2d b)
focal_class.full_signature: static Vector2d sum(final Tuple2d a, final Tuple2d b)
focal_class.identifier: sum
focal_class.modifiers: static
focal_class.parameters: (final Tuple2d a, final Tuple2d b)
focal_class.return: Vector2d
focal_class.signature: Vector2d sum(final Tuple2d a, final Tuple2d b)
focal_class.class_method_signature: VecmathUtil.negate(final Tuple2d vector)
focal_class.full_signature: static Vector2d negate(final Tuple2d vector)
focal_class.identifier: negate
focal_class.modifiers: static
focal_class.parameters: (final Tuple2d vector)
focal_class.return: Vector2d
focal_class.signature: Vector2d negate(final Tuple2d vector)
focal_class.class_method_signature: VecmathUtil.intersection(final Tuple2d p1, final Tuple2d d1, final Tuple2d p2, final Tuple2d d2)
focal_class.full_signature: static Point2d intersection(final Tuple2d p1, final Tuple2d d1, final Tuple2d p2, final Tuple2d d2)
focal_class.identifier: intersection
focal_class.modifiers: static
focal_class.parameters: (final Tuple2d p1, final Tuple2d d1, final Tuple2d p2, final Tuple2d d2)
focal_class.return: Point2d
focal_class.signature: Point2d intersection(final Tuple2d p1, final Tuple2d d1, final Tuple2d p2, final Tuple2d d2)
focal_class.class_method_signature: VecmathUtil.intersection(final double x1, final double y1, final double x2, final double y2, final double x3,
              final double y3, final double x4, final double y4)
focal_class.full_signature: static Point2d intersection(final double x1, final double y1, final double x2, final double y2, final double x3,
              final double y3, final double x4, final double y4)
focal_class.identifier: intersection
focal_class.modifiers: static
focal_class.parameters: (final double x1, final double y1, final double x2, final double y2, final double x3,
              final double y3, final double x4, final double y4)
focal_class.return: Point2d
focal_class.signature: Point2d intersection(final double x1, final double y1, final double x2, final double y2, final double x3,
              final double y3, final double x4, final double y4)
focal_class.class_method_signature: VecmathUtil.adjacentLength(Vector2d hypotenuse, Vector2d adjacent, double oppositeLength)
focal_class.full_signature: static double adjacentLength(Vector2d hypotenuse, Vector2d adjacent, double oppositeLength)
focal_class.identifier: adjacentLength
focal_class.modifiers: static
focal_class.parameters: (Vector2d hypotenuse, Vector2d adjacent, double oppositeLength)
focal_class.return: double
focal_class.signature: double adjacentLength(Vector2d hypotenuse, Vector2d adjacent, double oppositeLength)
focal_class.class_method_signature: VecmathUtil.average(final Collection<Vector2d> vectors)
focal_class.full_signature: static Vector2d average(final Collection<Vector2d> vectors)
focal_class.identifier: average
focal_class.modifiers: static
focal_class.parameters: (final Collection<Vector2d> vectors)
focal_class.return: Vector2d
focal_class.signature: Vector2d average(final Collection<Vector2d> vectors)
focal_class.class_method_signature: VecmathUtil.getNearestVector(final Vector2d reference, final List<Vector2d> vectors)
focal_class.full_signature: static Vector2d getNearestVector(final Vector2d reference, final List<Vector2d> vectors)
focal_class.identifier: getNearestVector
focal_class.modifiers: static
focal_class.parameters: (final Vector2d reference, final List<Vector2d> vectors)
focal_class.return: Vector2d
focal_class.signature: Vector2d getNearestVector(final Vector2d reference, final List<Vector2d> vectors)
focal_class.class_method_signature: VecmathUtil.getNearestVector(Vector2d reference, IAtom fromAtom, List<IBond> bonds)
focal_class.full_signature: static Vector2d getNearestVector(Vector2d reference, IAtom fromAtom, List<IBond> bonds)
focal_class.identifier: getNearestVector
focal_class.modifiers: static
focal_class.parameters: (Vector2d reference, IAtom fromAtom, List<IBond> bonds)
focal_class.return: Vector2d
focal_class.signature: Vector2d getNearestVector(Vector2d reference, IAtom fromAtom, List<IBond> bonds)
focal_class.class_method_signature: VecmathUtil.extent(Vector2d vector)
focal_class.full_signature: static double extent(Vector2d vector)
focal_class.identifier: extent
focal_class.modifiers: static
focal_class.parameters: (Vector2d vector)
focal_class.return: double
focal_class.signature: double extent(Vector2d vector)
focal_class.class_method_signature: VecmathUtil.extents(final List<Vector2d> vectors)
focal_class.full_signature: static double[] extents(final List<Vector2d> vectors)
focal_class.identifier: extents
focal_class.modifiers: static
focal_class.parameters: (final List<Vector2d> vectors)
focal_class.return: double[]
focal_class.signature: double[] extents(final List<Vector2d> vectors)
focal_class.class_method_signature: VecmathUtil.newVectorInLargestGap(final List<Vector2d> vectors)
focal_class.full_signature: static Vector2d newVectorInLargestGap(final List<Vector2d> vectors)
focal_class.identifier: newVectorInLargestGap
focal_class.modifiers: static
focal_class.parameters: (final List<Vector2d> vectors)
focal_class.return: Vector2d
focal_class.signature: Vector2d newVectorInLargestGap(final List<Vector2d> vectors)
focal_method.body: static List<Vector2d> newUnitVectors(final IAtom fromAtom, final List<IAtom> toAtoms) {
          final List<Vector2d> unitVectors = new ArrayList<Vector2d>(toAtoms.size());
          for (final IAtom toAtom : toAtoms) {
              unitVectors.add(newUnitVector(fromAtom.getPoint2d(), toAtom.getPoint2d()));
          }
          return unitVectors;
      }
focal_method.class_method_signature: VecmathUtil.newUnitVectors(final IAtom fromAtom, final List<IAtom> toAtoms)
focal_method.full_signature: static List<Vector2d> newUnitVectors(final IAtom fromAtom, final List<IAtom> toAtoms)
focal_method.identifier: newUnitVectors
focal_method.invocations: size add newUnitVector getPoint2d getPoint2d
focal_method.modifiers: static
focal_method.parameters: (final IAtom fromAtom, final List<IAtom> toAtoms)
focal_method.return: List<Vector2d>
focal_method.signature: List<Vector2d> newUnitVectors(final IAtom fromAtom, final List<IAtom> toAtoms)