Revision e46e17fb
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/object/RubikPyraminx.java | ||
---|---|---|
310 | 310 |
{ |
311 | 311 |
return (int)(getSize()*offset/(SQ3/2)); |
312 | 312 |
} |
313 |
|
|
314 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
315 |
|
|
316 |
public float returnRotationFactor(float offset) |
|
317 |
{ |
|
318 |
int size = getSize(); |
|
319 |
int row = (int)(size*offset/(SQ3/2)); |
|
320 |
|
|
321 |
return ((float)size)/(size-row); |
|
322 |
} |
|
313 | 323 |
} |
Also available in: Unified diff
Adjust rotation speed depending on the row (important in case of Pyraminx - there the top little tetrahedron must rotate much faster than the bottom big layer )