mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-26 10:00:42 +00:00
dialog:: in 2D matrix dialog, show degree unit, and do not negate
This commit is contained in:
parent
dff8db44b0
commit
3e1228b7c7
@ -301,7 +301,8 @@ EX namespace dialog {
|
||||
|
||||
ld as_degrees(transmatrix T) {
|
||||
hyperpoint h = T * point31(1, 0, 0);
|
||||
ld alpha = atan2(h[1], h[0]);
|
||||
ld alpha = atan2(-h[1], h[0]);
|
||||
if(alpha == 0) alpha = 0;
|
||||
return alpha / degree;
|
||||
}
|
||||
|
||||
@ -1148,7 +1149,7 @@ EX namespace dialog {
|
||||
if(dim == 2) {
|
||||
static ld angle;
|
||||
angle = as_degrees(*edit_matrix);
|
||||
addSelItem("enter angle", fts(angle), 'a');
|
||||
addSelItem("enter angle", fts(angle) + "°", 'a');
|
||||
dialog::add_action([this] {
|
||||
editNumber(angle, -180, 180, 90, 0, title, help);
|
||||
auto& ne = get_ne();
|
||||
|
Loading…
Reference in New Issue
Block a user