Package crazypants.vecmath

Examples of crazypants.vecmath.Vector2d


    }

    if(selectedCoord != null) {
     
      Vector3d blockCenter = new Vector3d(selectedCoord.x + 0.5, selectedCoord.y + 0.5, selectedCoord.z + 0.5);
      Vector2d blockCenterPixel = currentView.getScreenPoint(blockCenter);           
     
      Vector2d screenMidPixel = new Vector2d(Minecraft.getMinecraft().displayWidth, Minecraft.getMinecraft().displayHeight);
      screenMidPixel.scale(0.5);

     
      double pixDist = blockCenterPixel.distance(screenMidPixel);
      double rat = pixDist / Minecraft.getMinecraft().displayHeight;
      if(rat != rat) {
View Full Code Here


    }
    return scale;
  }

  private double addRatio(BlockCoord bc) {
    Vector2d sp = currentView.getScreenPoint(new Vector3d(bc.x + 0.5, bc.y + 0.5, bc.z + 0.5));
    Vector2d mid = new Vector2d(Minecraft.getMinecraft().displayWidth, Minecraft.getMinecraft().displayHeight);
    mid.scale(0.5);
    double d = sp.distance(mid);
    if(d != d) {
      d = 0f
     }
    float ratio = (float) d / Minecraft.getMinecraft().displayWidth;               
View Full Code Here

TOP

Related Classes of crazypants.vecmath.Vector2d

Copyright © 2018 www.massapicom. 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.