Revision fb377dae
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/objects/RubikPyraminx.java | ||
---|---|---|
391 | 391 |
canvas.drawArc( ARC3_W-RADIUS+left, ARC2_H-RADIUS, ARC3_W+RADIUS+left, ARC2_H+RADIUS, 345, 90, false, paint); |
392 | 392 |
} |
393 | 393 |
|
394 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
395 |
// I don't quite understand it, but 0.82 works better than the theoretically correct SQ3/2 ( 0.866 ) |
|
396 |
|
|
397 |
float returnMultiplier() |
|
398 |
{ |
|
399 |
return getSize()/0.82f;//(SQ3/2); |
|
400 |
} |
|
401 |
|
|
394 | 402 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
395 | 403 |
// PUBLIC API |
396 | 404 |
|
... | ... | |
407 | 415 |
} |
408 | 416 |
|
409 | 417 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
410 |
// I don't quite understand it, but 0.82 works better than the theoretically correct SQ3/2 ( 0.866 )
|
|
418 |
// 0.82?? see returnMultiplier()
|
|
411 | 419 |
|
412 |
public float returnMultiplier()
|
|
420 |
public int computeRowFromOffset(float offset)
|
|
413 | 421 |
{ |
414 |
return getSize()/0.82f;//(SQ3/2);
|
|
422 |
return (int)(getSize()*offset/0.82f);
|
|
415 | 423 |
} |
416 | 424 |
|
417 | 425 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Major progress with Dino; rotations (almost?) work now.