This is an automated email from the ASF dual-hosted git repository.
harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 1d1e357 forgot to commit getPercent in CoreClasses
1d1e357 is described below
commit 1d1e3578553fe8f75f3d2d884cb95f08b8986f6b
Author: Harbs <[email protected]>
AuthorDate: Tue Jan 5 14:12:35 2021 +0200
forgot to commit getPercent in CoreClasses
---
frameworks/projects/Core/src/main/royale/CoreClasses.as | 1 +
.../src/main/royale/org/apache/royale/utils/number/getPercent.as | 9 ++++++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/frameworks/projects/Core/src/main/royale/CoreClasses.as
b/frameworks/projects/Core/src/main/royale/CoreClasses.as
index 27986b7..21593fd 100644
--- a/frameworks/projects/Core/src/main/royale/CoreClasses.as
+++ b/frameworks/projects/Core/src/main/royale/CoreClasses.as
@@ -351,6 +351,7 @@ internal class CoreClasses
import org.apache.royale.utils.date.addYears; addYears;
import org.apache.royale.utils.number.pinValue; pinValue;
+ import org.apache.royale.utils.number.getPercent; getPercent;
import org.apache.royale.utils.event.hasPlatformModifier;
hasPlatformModifier;
import org.apache.royale.utils.sendEvent; sendEvent;
diff --git
a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/number/getPercent.as
b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/number/getPercent.as
index 80cb81b..beb3762 100644
---
a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/number/getPercent.as
+++
b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/number/getPercent.as
@@ -18,7 +18,10 @@
////////////////////////////////////////////////////////////////////////////////
package org.apache.royale.utils.number
{
- public function getPercent(numerator:Number,denominator:Number):Number{
- return pinValue((numerator / denominator) * 100,0,100);
- }
+ /**
+ * Takes a numerator and denominator and returns the fraction described
as a percent.
+ */
+ public function getPercent(numerator:Number,denominator:Number):Number{
+ return pinValue((numerator / denominator) * 100,0,100);
+ }
}
\ No newline at end of file