mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-23 12:34:03 +00:00
C0 and Cx1 now changes depending on DIM
This commit is contained in:
4
hyper.h
4
hyper.h
@@ -3180,7 +3180,9 @@ extern ld backbrightness;
|
|||||||
|
|
||||||
void initcells();
|
void initcells();
|
||||||
void precalc();
|
void precalc();
|
||||||
extern const hyperpoint C0;
|
extern const hyperpoint C02, C03;
|
||||||
|
|
||||||
|
#define C0 (DIM == 2 ? C02 : C03)
|
||||||
|
|
||||||
extern long long circlesize[100], disksize[100];
|
extern long long circlesize[100], disksize[100];
|
||||||
extern ld circlesizeD[10000];
|
extern ld circlesizeD[10000];
|
||||||
|
@@ -128,13 +128,17 @@ hyperpoint hpxy3(ld x, ld y, ld z) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// center of the pseudosphere
|
// center of the pseudosphere
|
||||||
const hyperpoint Hypc = hpxyz(0,0,0);
|
const hyperpoint Hypc = hyperpoint(0,0,0,0);
|
||||||
|
|
||||||
// origin of the hyperbolic plane
|
// origin of the hyperbolic plane
|
||||||
const hyperpoint C0 = hpxyz(0,0,1);
|
const hyperpoint C02 = hyperpoint(0,0,1,0);
|
||||||
|
const hyperpoint C03 = hyperpoint(0,0,0,1);
|
||||||
|
|
||||||
// a point (I hope this number needs no comments ;) )
|
// a point (I hope this number needs no comments ;) )
|
||||||
const hyperpoint Cx1 = hpxyz(1,0,1.41421356237);
|
const hyperpoint Cx12 = hyperpoint(1,0,1.41421356237,0);
|
||||||
|
const hyperpoint Cx13 = hyperpoint(1,0,0,1.41421356237);
|
||||||
|
|
||||||
|
#define Cx1 (DIM==2?Cx12:Cx13)
|
||||||
|
|
||||||
// this function returns approximate square of distance between two points
|
// this function returns approximate square of distance between two points
|
||||||
// (in the spherical analogy, this would be the distance in the 3D space,
|
// (in the spherical analogy, this would be the distance in the 3D space,
|
||||||
|
Reference in New Issue
Block a user