[gnumeric] Add PS to CONVERT
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Add PS to CONVERT
- Date: Tue, 16 Jun 2015 04:35:04 +0000 (UTC)
commit a0c1facf1444ac238f4e80aea1dbcfe1b908b8db
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Mon Jun 15 22:31:21 2015 -0600
Add PS to CONVERT
2015-06-15 Andreas J. Guelzow <aguelzow pyrshep ca>
* functions.c (gnumeric_convert): add PS
(help_convert): add PS
plugins/fn-eng/ChangeLog | 5 +++++
plugins/fn-eng/functions.c | 3 +++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/plugins/fn-eng/ChangeLog b/plugins/fn-eng/ChangeLog
index dac8abb..3825424 100644
--- a/plugins/fn-eng/ChangeLog
+++ b/plugins/fn-eng/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-15 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * functions.c (gnumeric_convert): add PS
+ (help_convert): add PS
+
2015-04-16 Morten Welinder <terra gnome org>
* Release 1.12.22
diff --git a/plugins/fn-eng/functions.c b/plugins/fn-eng/functions.c
index 3c9fcf3..b78e69d 100644
--- a/plugins/fn-eng/functions.c
+++ b/plugins/fn-eng/functions.c
@@ -691,6 +691,7 @@ static GnmFuncHelp const help_convert[] = {
"\t'BTU' \t\tBTU\n\n"
"Power:\n"
"\t'HP' \t\tHorsepower\n"
+ "\t'PS' \t\tPferdestärke\n"
"\t'W' \t\tWatt\n\n"
"Magnetism:\n"
"\t'T' \t\tTesla\n"
@@ -837,6 +838,7 @@ gnumeric_convert (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
/* Power constants */
#define one_HP_to_W 745.701
+#define one_PS_to_W 735.49875
/* Energy constants */
#define one_J_to_e 9999995.193
@@ -946,6 +948,7 @@ gnumeric_convert (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static const eng_convert_unit_t power_units[] = {
{ "HP", 1.0 },
+ { "PS", one_HP_to_W/one_PS_to_W },
{ "W", one_HP_to_W },
{ NULL, 0.0 }
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]