Examples of scale()


Examples of javax.jdo.annotations.Column.scale()

                existingLength = existingFacet.getLength();
                existingScale = existingFacet.getScale();
            }
           
            Integer length = valueElseDefaults(jdoColumnAnnotation.length(), existingLength, DEFAULT_LENGTH);
            Integer scale = valueElseDefaults(jdoColumnAnnotation.scale(), existingScale, DEFAULT_SCALE);
            final BigDecimalValueFacet facet = new BigDecimalFacetDerivedFromJdoColumn(holder, length, scale);
            FacetUtil.addFacet(facet);
        }
    }
View Full Code Here

Examples of javax.persistence.Column.scale()

                                    null, "persistent", null, null, null, null, null, null, null, null, null, null, null, null,
                                    null, null, null, null, null, null);
                                Column col = overrides[j].column();
                                // TODO Make inferrals about jdbctype, length etc if the field is 1 char etc
                                fmd.addColumn(new ColumnMetaData(fmd, col.name(), null, null, null, null,
                                    "" + col.length(), "" + col.scale(), "" + col.nullable(), null, null,
                                    "" + col.insertable(), "" + col.updatable(), "" + col.unique()));
                                overriddenFields.add(fmd);
                            }
                        }
                    }
View Full Code Here

Examples of javax.persistence.MapKeyColumn.scale()

    assertTrue( keyColAnno.insertable() );
    assertFalse( keyColAnno.unique() );
    assertTrue( keyColAnno.updatable() );
    assertEquals( 255, keyColAnno.length() );
    assertEquals( 0, keyColAnno.precision() );
    assertEquals( 0, keyColAnno.scale() );
  }

  public void testMapKeyColumnAllAttributes() throws Exception {
    reader = getReader( Entity3.class, "field1", "element-collection.orm13.xml" );
    assertAnnotationPresent( ElementCollection.class );
View Full Code Here

Examples of javax.vecmath.GVector.scale()

  public Float intersectsWithRay(Coordinate origin, Coordinate direction)
  {
    float largestDistance = Math.max((float)(A.getPosition().x - origin.x), (float)(B.getPosition().x - origin.x)) * 2f;
    GVector v=new GVector(new double[] {origin.x,origin.y});
    GVector d=new GVector(new double[] {direction.x,direction.y});
    d.scale(largestDistance);
    v.add(d);
    LineSegment raySegment = new LineSegment(new Vertex(origin, 0), new Vertex(new Coordinate(v.getElement(0),v.getElement(1)), 0));
    Coordinate intersection= findIntersection(this, raySegment);
    Float value = null;
   
View Full Code Here

Examples of javax.vecmath.Point2d.scale()

        int ct = 0;
        for ( int i = 0; i < snakeData_.getNumSegments(); i += 2 ) {
            ct++;
            center.add( segment_[i].getCenterParticle() );
        }
        center.scale( 1.0 / (double) ct );
        return center;
    }

    /**
     * shift/translate the whole snake by the specified vector
View Full Code Here

Examples of javax.vecmath.Point3d.scale()

// For a infinite bounds. What is the centroid ?
@Override
Point3d getCenter() {
  Point3d cent = new Point3d();
  cent.add(upper, lower);
  cent.scale(0.5d);
  return cent;
}

@Override
public void getCenter(Point3d center) {
View Full Code Here

Examples of javax.vecmath.Point3f.scale()

        maxXYZ = new Point3f(getMinMax(dataX, true, propertyX), getMinMax(
            dataY, true, propertyY), getMinMax(dataZ, true, propertyZ));
      Logger.info("plot min/max: " + minXYZ + " " + maxXYZ);
      Point3f center = new Point3f(maxXYZ);
      center.add(minXYZ);
      center.scale(0.5f);
      factors.set(maxXYZ);
      factors.sub(minXYZ);
      factors.set(factors.x / 200, factors.y / 200, factors.z / 200);
      if (Token.tokAttr(propertyX, Token.intproperty)) {
        factors.x = 1;
View Full Code Here

Examples of javax.vecmath.Point4f.scale()

        pt = new Point3f((Point3f) x2.value);
        pt.scale(-1f);
        return addX(pt);
      case Token.point4f:
        pt4 = new Point4f((Point4f) x2.value);
        pt4.scale(-1f);
        return addX(pt4);
      case Token.matrix3f:
        m = new Matrix3f((Matrix3f) x2.value);
        m.transpose();
        return addX(m);
View Full Code Here

Examples of javax.vecmath.Vector2d.scale()

            // v = v0 + a * dt
            totAcc.add(fo.getAcceleration());
            totAcc.scale(deltaTime / 1000.0);
            newVelocity.add(fo.getVelocity());
            newVelocity.add(totAcc);
            newVelocity.scale(env.getEnvironmentalResistanceAtPoint(fo.getPosition()));
            fo.setVelocity(newVelocity);
        }
       
        // TODO: Collision detection
        for (int i = 0; i < fWorld.objects.size(); i++) {
View Full Code Here

Examples of javax.vecmath.Vector2f.scale()

        // Get corresponding shape coordinate
        textureCoordinate.set(area.getPoint(j));
       
        // Rotate, scale, translate results in translation first, then scaling and then rotation
        Transformations.rotate(textureCoordinate, rad);
        textureCoordinate.scale(scale);
        textureCoordinate.x += x;
        textureCoordinate.y += y;
      }
    }
    shape.setTexture(texture);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.