From 7bb5c02d6c9724dff06fbd42c9b0303db62c6ccb Mon Sep 17 00:00:00 2001 From: serso Date: Fri, 16 Dec 2011 00:39:24 +0400 Subject: [PATCH] double factorial --- res/layout/calc_eight_digit_button.xml | 2 +- res/layout/calc_nine_digit_button.xml | 2 +- res/layout/calc_seven_digit_button.xml | 2 +- res/values-ru/strings.xml | 1 + res/values/strings.xml | 1 + .../org/solovyev/android/calculator/TextHighlighter.java | 1 + .../calculator/model/AndroidPostfixFunctionsRegistry.java | 1 + .../solovyev/android/calculator/TextHighlighterTest.java | 1 + .../android/calculator/model/CalculatorEngineTest.java | 6 +++--- 9 files changed, 11 insertions(+), 6 deletions(-) diff --git a/res/layout/calc_eight_digit_button.xml b/res/layout/calc_eight_digit_button.xml index 635a3918..2b2e3877 100644 --- a/res/layout/calc_eight_digit_button.xml +++ b/res/layout/calc_eight_digit_button.xml @@ -10,7 +10,7 @@ xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator" a:id="@+id/eightDigitButton" a:text="8" calc:textUp="ln" - calc:textLeft="0b:" + calc:textLeft="0o:" calc:textDown="lg" calc:directionTextScale="0.5;0.5;0.5;0.33" style="?digitButtonStyle" diff --git a/res/layout/calc_nine_digit_button.xml b/res/layout/calc_nine_digit_button.xml index 86027e41..c178a105 100644 --- a/res/layout/calc_nine_digit_button.xml +++ b/res/layout/calc_nine_digit_button.xml @@ -10,7 +10,7 @@ xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator" a:id="@+id/nineDigitButton" a:text="9" calc:textDown="e" - calc:textLeft="0o:" + calc:textLeft="0x:" calc:textUp="π" calc:directionTextScale="0.5;0.5;0.5;0.33" style="?digitButtonStyle" diff --git a/res/layout/calc_seven_digit_button.xml b/res/layout/calc_seven_digit_button.xml index c61ee349..c923e3a5 100644 --- a/res/layout/calc_seven_digit_button.xml +++ b/res/layout/calc_seven_digit_button.xml @@ -10,7 +10,7 @@ xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator" a:id="@+id/sevenDigitButton" a:text="7" calc:textUp="i" - calc:textLeft="0x:" + calc:textLeft="0b:" calc:textDown="!" calc:directionTextScale="0.5;0.5;0.5;0.33" style="?digitButtonStyle" diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index ef290653..30621e55 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -183,6 +183,7 @@ Интегрирует функцию \'f(x)\' по переменной \'x\' от \'a\' до \'b\'. Возвращает факториал от предыдущего выражения. + Возвращает двойной факториал от предыдущего выражения. Возвращает процентное значение от предыдущего выражения.\nПримеры:\n 100 + 50% = 150\n 100 * 50% = 50\n diff --git a/res/values/strings.xml b/res/values/strings.xml index 4e35c5be..304fe2fd 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -184,6 +184,7 @@ Integrates function \'f(x)\' by \'x\' variable from \'a\' to \'b\'. Gives the factorial of the expression before. + Gives the double factorial of the expression before. Gives the percent value of the expression before.\nExamples:\n 100 + 50% = 150\n diff --git a/src/main/java/org/solovyev/android/calculator/TextHighlighter.java b/src/main/java/org/solovyev/android/calculator/TextHighlighter.java index 799f52d7..b535bebf 100644 --- a/src/main/java/org/solovyev/android/calculator/TextHighlighter.java +++ b/src/main/java/org/solovyev/android/calculator/TextHighlighter.java @@ -146,6 +146,7 @@ public class TextHighlighter implements TextProcessor