new constants added
This commit is contained in:
parent
dba1d24ec9
commit
abd7b3729b
@ -60,6 +60,10 @@
|
|||||||
<string name="c_pi_description">Отношение длины окружности к диаметру</string>
|
<string name="c_pi_description">Отношение длины окружности к диаметру</string>
|
||||||
<string name="c_e_description">Вещесвтенное число, такое что производная функции f(x) = e^x в точке x = 0 равно 1</string>
|
<string name="c_e_description">Вещесвтенное число, такое что производная функции f(x) = e^x в точке x = 0 равно 1</string>
|
||||||
<string name="c_i_description">Мнимая единица, определённая как i^2 = −1</string>
|
<string name="c_i_description">Мнимая единица, определённая как i^2 = −1</string>
|
||||||
|
<string name="c_c_description">Скорость света в вакууме, м·с^-1</string>
|
||||||
|
<string name="c_g_description">Гравитационная постоянная, с^3·кг^−1·с^−2</string>
|
||||||
|
<string name="c_h_description">Постоянная Планка - коэффициент, связывающий величину энергии электромагнитного излучения с его частотой, Дж·с</string>
|
||||||
|
<string name="c_h_reduced_description">Привидённая постоянная Планка, Дж·с</string>
|
||||||
<string name="c_nan_description">Не число</string>
|
<string name="c_nan_description">Не число</string>
|
||||||
<string name="c_infinity_description">Бесконечность</string>
|
<string name="c_infinity_description">Бесконечность</string>
|
||||||
<string name="c_calc_editor_hint">Введите новое выражение</string>
|
<string name="c_calc_editor_hint">Введите новое выражение</string>
|
||||||
|
@ -63,6 +63,10 @@
|
|||||||
<string name="c_pi_description">Ratio of any circle\'s circumference to its diameter</string>
|
<string name="c_pi_description">Ratio of any circle\'s circumference to its diameter</string>
|
||||||
<string name="c_e_description">Unique real number such that the value of the derivative (slope of the tangent line) of the function f(x) = e^x at the point x = 0 is equal to 1</string>
|
<string name="c_e_description">Unique real number such that the value of the derivative (slope of the tangent line) of the function f(x) = e^x at the point x = 0 is equal to 1</string>
|
||||||
<string name="c_i_description">Imaginary unit, defined such that i^2 = −1</string>
|
<string name="c_i_description">Imaginary unit, defined such that i^2 = −1</string>
|
||||||
|
<string name="c_c_description">Speed of light in vacuum, m·s^-1</string>
|
||||||
|
<string name="c_g_description">The gravitational constant is an empirical physical constant involved in the calculation of the gravitational attraction between objects with mass, m^3·kg^−1·s^−2</string>
|
||||||
|
<string name="c_h_description">Physical constant reflecting the sizes of energy quanta in quantum mechanics, J·s</string>
|
||||||
|
<string name="c_h_reduced_description">Reduced Planck constant, J·s</string>
|
||||||
<string name="c_nan_description">Not a number</string>
|
<string name="c_nan_description">Not a number</string>
|
||||||
<string name="c_infinity_description">Infinity</string>
|
<string name="c_infinity_description">Infinity</string>
|
||||||
|
|
||||||
|
@ -321,12 +321,18 @@ public enum MathType {
|
|||||||
|
|
||||||
public static final String PI = "π";
|
public static final String PI = "π";
|
||||||
public static final String E = "e";
|
public static final String E = "e";
|
||||||
|
public static final String C = "c";
|
||||||
|
public static final Double C_VALUE = 299792458d;
|
||||||
|
public static final String G = "G";
|
||||||
|
public static final Double G_VALUE = 6.6738480E-11;
|
||||||
|
public static final String H_REDUCED = "h";
|
||||||
|
public static final Double H_REDUCED_VALUE = 6.6260695729E-34 / ( 2 * Math.PI );
|
||||||
public final static String NAN = "NaN";
|
public final static String NAN = "NaN";
|
||||||
|
|
||||||
public final static String INFINITY = "∞";
|
public final static String INFINITY = "∞";
|
||||||
public final static String INFINITY_JSCL = "Infinity";
|
public final static String INFINITY_JSCL = "Infinity";
|
||||||
|
|
||||||
public static final List<String> constants = Arrays.asList(E, PI, IMAGINARY_NUMBER, NAN, INFINITY);
|
public static final List<String> constants = Arrays.asList(E, PI, C, G, H_REDUCED, IMAGINARY_NUMBER, NAN, INFINITY);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method determines mathematical entity type for text substring starting from ith index
|
* Method determines mathematical entity type for text substring starting from ith index
|
||||||
|
@ -148,6 +148,18 @@ class VarsRegisterImpl implements VarsRegister {
|
|||||||
} else if (systemVarName.equals(MathType.PI)) {
|
} else if (systemVarName.equals(MathType.PI)) {
|
||||||
builder = new Var.Builder(systemVarName, Math.PI);
|
builder = new Var.Builder(systemVarName, Math.PI);
|
||||||
varDescription = R.string.c_pi_description;
|
varDescription = R.string.c_pi_description;
|
||||||
|
} else if (systemVarName.equals(MathType.C)) {
|
||||||
|
builder = new Var.Builder(systemVarName, MathType.C_VALUE);
|
||||||
|
varDescription = R.string.c_c_description;
|
||||||
|
} else if (systemVarName.equals(MathType.G)) {
|
||||||
|
builder = new Var.Builder(systemVarName, MathType.G_VALUE);
|
||||||
|
varDescription = R.string.c_g_description;
|
||||||
|
/* } else if (systemVarName.equals(MathType.H)) {
|
||||||
|
builder = new Var.Builder(systemVarName, MathType.H_VALUE);
|
||||||
|
varDescription = R.string.c_h_description;*/
|
||||||
|
} else if (systemVarName.equals(MathType.H_REDUCED)) {
|
||||||
|
builder = new Var.Builder(systemVarName, MathType.H_REDUCED_VALUE);
|
||||||
|
varDescription = R.string.c_h_reduced_description;
|
||||||
} else if (systemVarName.equals(MathType.IMAGINARY_NUMBER)) {
|
} else if (systemVarName.equals(MathType.IMAGINARY_NUMBER)) {
|
||||||
builder = new Var.Builder(systemVarName, MathType.IMAGINARY_NUMBER_JSCL);
|
builder = new Var.Builder(systemVarName, MathType.IMAGINARY_NUMBER_JSCL);
|
||||||
varDescription = R.string.c_i_description;
|
varDescription = R.string.c_i_description;
|
||||||
|
Loading…
Reference in New Issue
Block a user