1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

scaleSinh100, used in IPD config

This commit is contained in:
Zeno Rogue 2019-07-03 04:55:27 +02:00
parent fc43a4716b
commit a7e1418ffd
2 changed files with 3 additions and 1 deletions

View File

@ -1221,7 +1221,7 @@ void showStereo() {
dialog::editNumber(vid.ipd, -10, 10, 0.01, 0, XLAT("pupillary distance"),
help3 +
XLAT("The distance between your eyes in the represented 3D object. This is given in absolute units.")
);
), dialog::scaleSinh100();
else if(uni == 'd' && vid.stereo_mode == sAnaglyph)
dialog::editNumber(vid.anaglyph_eyewidth, -1, 1, 0.01, 0, XLAT("distance between images"),

View File

@ -1937,6 +1937,7 @@ namespace dialog {
const static scaler identity = {identity_f, identity_f, false};
const static scaler logarithmic = {log, exp, true};
const static scaler asinhic = {asinh, sinh, false};
const static scaler asinhic100 = {[] (ld x) { return asinh(x*100); }, [] (ld x) { return sinh(x)/100; }, false};
struct numberEditor {
ld *editwhat;
@ -1981,6 +1982,7 @@ namespace dialog {
void use_hexeditor();
inline void scaleLog() { ne.sc = logarithmic; }
inline void scaleSinh() { ne.sc = asinhic; }
inline void scaleSinh100() { ne.sc = asinhic100; }
void bound_low(ld val);
void bound_up(ld val);