mirror of
https://github.com/zeroflag/fcl.git
synced 2025-01-11 20:01:10 +01:00
more buttons + %d
This commit is contained in:
parent
43b718d1a7
commit
40e8a28595
2 changed files with 8 additions and 2 deletions
|
@ -99,4 +99,5 @@
|
|||
: day ( -- y )
|
||||
:java.util.Calendar/DAY_OF_MONTH jvm-static-var
|
||||
:java.util.Calendar/getInstance jvm-call-static
|
||||
:get/i jvm-call-method ;
|
||||
:get/i jvm-call-method ;
|
||||
: d% ( n1 n2 -- n3 ) swap dup abs >r - r> / 100 * ;
|
||||
|
|
|
@ -400,7 +400,12 @@ public class FclTest {
|
|||
assertEquals(10, evalPop("100 10 percent").doubleValue(), 0.001);
|
||||
assertEquals(100, evalPop("100 100 percent").doubleValue(), 0.001);
|
||||
assertEquals(130.686, evalPop("4356.2 3 percent").doubleValue(), 0.001);
|
||||
assertEquals(0.16482, evalPop("1.23 13.4 percent").doubleValue(), 0.001);
|
||||
assertEquals(10, evalPop("100 110 d%").doubleValue(), 0.001);
|
||||
assertEquals(-10, evalPop("100 90 d%").doubleValue(), 0.001);
|
||||
assertEquals(181.026, evalPop("23.4 65.76 d%").doubleValue(), 0.001);
|
||||
assertEquals(-181.026, evalPop("-23.4 -65.76 d%").doubleValue(), 0.001);
|
||||
assertEquals(-381.026, evalPop("23.4 -65.76 d%").doubleValue(), 0.001);
|
||||
assertEquals(381.026, evalPop("-23.4 65.76 d%").doubleValue(), 0.001);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in a new issue