mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-31 22:12:59 +00:00
ru:: using struct xy instead of ld pair
This commit is contained in:
@@ -20,7 +20,10 @@ hyperpoint to_hyper(ld x, ld y) {
|
||||
return perspective_to_space(h, 1, gcHyperbolic);
|
||||
}
|
||||
|
||||
pair<ld, ld> from_hyper(hyperpoint h) {
|
||||
hyperpoint to_hyper(xy xy) { return to_hyper(xy.x, xy.y); }
|
||||
|
||||
|
||||
xy from_hyper(hyperpoint h) {
|
||||
if(non_hyperbolic) return {h[0], h[1]};
|
||||
h = spin90() * h; h[0] = -h[0];
|
||||
h[2] += 1;
|
||||
|
||||
Reference in New Issue
Block a user