mirror of
https://gitlab.com/c3d/db48x.git
synced 2024-09-29 05:36:58 +02:00
documentation: Show the correct index for constants and equations
For constant and equations menus, match the index in the help file. Fixes: #1039 Fixes: #1048 Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
This commit is contained in:
parent
0f51b08e66
commit
fc1dace26d
6 changed files with 46 additions and 29 deletions
|
@ -4,7 +4,7 @@ The DB48X calculator features a library of constants covering mathematics,
|
|||
physics, chemistry and computer science. The built-in constants can be extended
|
||||
using the `config/constants.csv` configuration file.
|
||||
|
||||
## Mathematical constants
|
||||
## Mathematics constants
|
||||
|
||||
### π constant
|
||||
|
||||
|
@ -345,26 +345,26 @@ logarithmic quantity, most often expressed in decibels dB. I0 is the sound
|
|||
intensity used as a reference, corresponding to 0dB.
|
||||
|
||||
|
||||
## Dates
|
||||
## Dates Constants
|
||||
|
||||
### BastilleDay
|
||||
### BastilleDay constant
|
||||
|
||||
French national day
|
||||
|
||||
### MartinLutherKingDeath
|
||||
### MartinLutherKingDeath constant
|
||||
|
||||
Martin Luther King Jr., an African-American clergyman and civil rights movement
|
||||
leader, was fatally shot at the Lorraine Motel in Memphis, Tennessee, on April
|
||||
4, 1968, at 6:01 p.m.
|
||||
|
||||
### IndependenceDay
|
||||
### IndependenceDay constant
|
||||
|
||||
Independence Day, known colloquially as the Fourth of July, is a federal holiday
|
||||
in the United States which commemorates the ratification of the Declaration of
|
||||
Independence by the Second Continental Congress on July 4, 1776, establishing
|
||||
the United States of America.
|
||||
|
||||
## Computing-related constants
|
||||
## Computing constants
|
||||
|
||||
### No constant
|
||||
|
||||
|
|
|
@ -42,6 +42,12 @@ relative to the loads.
|
|||
* Internal bending moment is positive counterclockwise on the left-hand part.
|
||||
* Shear force is positive downward on the left-hand part.
|
||||
|
||||
### Elastic Buckling
|
||||
|
||||
These equations apply to a slender column (`K·L/r>100`) with length factor `K`.
|
||||
|
||||
![Elastic Buckling](img/ElasticBuckling.bmp)
|
||||
|
||||
|
||||
|
||||
## Electricity
|
||||
|
|
|
@ -4564,7 +4564,7 @@ The DB48X calculator features a library of constants covering mathematics,
|
|||
physics, chemistry and computer science. The built-in constants can be extended
|
||||
using the `config/constants.csv` configuration file.
|
||||
|
||||
## Mathematical constants
|
||||
## Mathematics constants
|
||||
|
||||
### π constant
|
||||
|
||||
|
@ -4905,26 +4905,26 @@ logarithmic quantity, most often expressed in decibels dB. I0 is the sound
|
|||
intensity used as a reference, corresponding to 0dB.
|
||||
|
||||
|
||||
## Dates
|
||||
## Dates Constants
|
||||
|
||||
### BastilleDay
|
||||
### BastilleDay constant
|
||||
|
||||
French national day
|
||||
|
||||
### MartinLutherKingDeath
|
||||
### MartinLutherKingDeath constant
|
||||
|
||||
Martin Luther King Jr., an African-American clergyman and civil rights movement
|
||||
leader, was fatally shot at the Lorraine Motel in Memphis, Tennessee, on April
|
||||
4, 1968, at 6:01 p.m.
|
||||
|
||||
### IndependenceDay
|
||||
### IndependenceDay constant
|
||||
|
||||
Independence Day, known colloquially as the Fourth of July, is a federal holiday
|
||||
in the United States which commemorates the ratification of the Declaration of
|
||||
Independence by the Second Continental Congress on July 4, 1776, establishing
|
||||
the United States of America.
|
||||
|
||||
## Computing-related constants
|
||||
## Computing constants
|
||||
|
||||
### No constant
|
||||
|
||||
|
@ -4997,6 +4997,12 @@ relative to the loads.
|
|||
* Internal bending moment is positive counterclockwise on the left-hand part.
|
||||
* Shear force is positive downward on the left-hand part.
|
||||
|
||||
### Elastic Buckling
|
||||
|
||||
These equations apply to a slender column (`K·L/r>100`) with length factor `K`.
|
||||
|
||||
![Elastic Buckling](img/ElasticBuckling.bmp)
|
||||
|
||||
|
||||
|
||||
## Electricity
|
||||
|
|
|
@ -4564,7 +4564,7 @@ The DB50X calculator features a library of constants covering mathematics,
|
|||
physics, chemistry and computer science. The built-in constants can be extended
|
||||
using the `config/constants.csv` configuration file.
|
||||
|
||||
## Mathematical constants
|
||||
## Mathematics constants
|
||||
|
||||
### π constant
|
||||
|
||||
|
@ -4905,26 +4905,26 @@ logarithmic quantity, most often expressed in decibels dB. I0 is the sound
|
|||
intensity used as a reference, corresponding to 0dB.
|
||||
|
||||
|
||||
## Dates
|
||||
## Dates Constants
|
||||
|
||||
### BastilleDay
|
||||
### BastilleDay constant
|
||||
|
||||
French national day
|
||||
|
||||
### MartinLutherKingDeath
|
||||
### MartinLutherKingDeath constant
|
||||
|
||||
Martin Luther King Jr., an African-American clergyman and civil rights movement
|
||||
leader, was fatally shot at the Lorraine Motel in Memphis, Tennessee, on April
|
||||
4, 1968, at 6:01 p.m.
|
||||
|
||||
### IndependenceDay
|
||||
### IndependenceDay constant
|
||||
|
||||
Independence Day, known colloquially as the Fourth of July, is a federal holiday
|
||||
in the United States which commemorates the ratification of the Declaration of
|
||||
Independence by the Second Continental Congress on July 4, 1776, establishing
|
||||
the United States of America.
|
||||
|
||||
## Computing-related constants
|
||||
## Computing constants
|
||||
|
||||
### No constant
|
||||
|
||||
|
@ -4997,6 +4997,12 @@ relative to the loads.
|
|||
* Internal bending moment is positive counterclockwise on the left-hand part.
|
||||
* Shear force is positive downward on the left-hand part.
|
||||
|
||||
### Elastic Buckling
|
||||
|
||||
These equations apply to a slender column (`K·L/r>100`) with length factor `K`.
|
||||
|
||||
![Elastic Buckling](img/ElasticBuckling.bmp)
|
||||
|
||||
|
||||
|
||||
## Electricity
|
||||
|
|
|
@ -276,7 +276,7 @@ static const cstring basic_constants[] =
|
|||
// ------------------------------------------------------------------------
|
||||
// MATH CONSTANTS MENU
|
||||
// ------------------------------------------------------------------------
|
||||
"Math", nullptr,
|
||||
"Mathematics", nullptr,
|
||||
|
||||
"π", "3.14159", // Evaluated specially (decimal-pi.h)
|
||||
"e", "2.71828", // Evaluated specially (decimal-e.h)
|
||||
|
@ -289,7 +289,7 @@ static const cstring basic_constants[] =
|
|||
// Chemistry
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
"Chem", nullptr,
|
||||
"Chemistry", nullptr,
|
||||
|
||||
"NA", "6.0221367E23_mol⁻¹", // Avogradro's number
|
||||
"k", "1.380658E-23_J/K", // Boltzmann
|
||||
|
@ -303,7 +303,7 @@ static const cstring basic_constants[] =
|
|||
// Physics
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
"Phys", nullptr,
|
||||
"Physics", nullptr,
|
||||
|
||||
"ⅉ", "0+ⅈ1", // Imaginary unit in physics
|
||||
"c", "299792458_m/s", // Speed of light
|
||||
|
@ -342,7 +342,7 @@ static const cstring basic_constants[] =
|
|||
// ------------------------------------------------------------------------
|
||||
// Computing
|
||||
// ------------------------------------------------------------------------
|
||||
"Comp", nullptr,
|
||||
"Computing", nullptr,
|
||||
|
||||
"No", "False", // No value = false
|
||||
"Yes", "True", // Yes value = true
|
||||
|
@ -368,8 +368,8 @@ const constant::config constant::constants =
|
|||
// Define the configuration for the constants
|
||||
// ----------------------------------------------------------------------------
|
||||
{
|
||||
.menu_help = "Constants",
|
||||
.help = "Constant",
|
||||
.menu_help = " Constants",
|
||||
.help = " Constant",
|
||||
.prefix = L'Ⓒ',
|
||||
.type = ID_constant,
|
||||
.first_menu = ID_ConstantsMenu00,
|
||||
|
@ -610,7 +610,7 @@ utf8 constant::do_instance_help(constant::config_r cfg) const
|
|||
static char buf[64];
|
||||
size_t len = 0;
|
||||
utf8 base = do_name(cfg, &len);
|
||||
snprintf(buf, sizeof(buf), "%.*s %s", int(len), base, cfg.help);
|
||||
snprintf(buf, sizeof(buf), "%.*s%s", int(len), base, cfg.help);
|
||||
return utf8(buf);
|
||||
}
|
||||
|
||||
|
@ -799,7 +799,7 @@ utf8 constant_menu::do_menu_help(constant::config_r cfg,
|
|||
static char buf[64];
|
||||
size_t len = 0;
|
||||
utf8 base = do_name(cfg, cst->type(), len);
|
||||
snprintf(buf, sizeof(buf), "%.*s %s", int(len), base, cfg.menu_help);
|
||||
snprintf(buf, sizeof(buf), "%.*s%s", int(len), base, cfg.menu_help);
|
||||
return utf8(buf);
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,6 @@ static const cstring basic_equations[] =
|
|||
|
||||
"RelativityMassEnergy", "'(E_J)=(m_kg)*Ⓒc^2'",
|
||||
"IdealGas", "'(P_Pa)*(V_m^3)=(n_mol)*ⒸR*(T_K)'"
|
||||
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
@ -110,8 +109,8 @@ const equation::config equation::equations =
|
|||
// Define the configuration for the equations
|
||||
// ----------------------------------------------------------------------------
|
||||
{
|
||||
.menu_help = "Equations",
|
||||
.help = "Equation",
|
||||
.menu_help = "",
|
||||
.help = "",
|
||||
.prefix = L'Ⓔ',
|
||||
.type = ID_equation,
|
||||
.first_menu = ID_EquationsMenu00,
|
||||
|
|
Loading…
Reference in a new issue