Project

General

Profile

« Previous | Next » 

Revision 2fc1891a

Added by Leszek Koltunski 9 months ago

Fix for improper calculations of circumscribed radius

View differences:

src/main/java/org/distorted/objectlib/main/TwistyObject.java
1155 1155

  
1156 1156
  public float getCircumscribedRadius()
1157 1157
    {
1158
    switch( getCategory() )
1158
    int category = getCategory();
1159
    int shape = Metadata.getCategoryShape(category);
1160

  
1161
    switch( shape )
1159 1162
      {
1160 1163
      case Metadata.CATEGORY_SHAPE_TET: return (SQ6/4)*mSize;
1161 1164
      case Metadata.CATEGORY_SHAPE_HEX: return (SQ3/2)*mSize;

Also available in: Unified diff