@@ -64,17 +64,19 @@ FutureTaskExecutor.runDelayed(Runnable runnable, int delayInMilliSeconds, boolea
6464### Mathematical functions :
6565Standard:
6666``` java
67- class AdvMath {
68- double sum (double ... summands );
69- double difference (double minuend , double ... subtrahents );
70- double product (double ... factors );
71- double quotient (double dividend , double ... divisors );
72-
73- BigDecimal bigSum (BigDecimal ... summands );
74- BigDecimal bigDifference (BigDecimal minuend , BigDecimal ... subtrahents );
75- BigDecimal bigProduct (BigDecimal ... factors );
76- BigDecimal bigQuotient (BigDecimal dividend , BigDecimal ... divisors );
77- }
67+ double sum(double . .. summands);
68+ double difference(double minuend, double . .. subtrahents);
69+ double product(double . .. factors);
70+ double quotient(double dividend, double . .. divisors);
71+
72+ BigDecimal bigSum(BigDecimal . .. summands);
73+ BigDecimal bigDifference(BigDecimal minuend, BigDecimal . .. subtrahents);
74+ BigDecimal bigProduct(BigDecimal . .. factors);
75+ BigDecimal bigQuotient(BigDecimal dividend, BigDecimal . .. divisors);
76+ ```
77+ Example :
78+ ``` java
79+ int sum = AdvMath . sum(5 ,7 ,0 ,9 ,8 ,5 ,- 7 ,0 );
7880```
7981There are many other functions - just try it out !
8082
@@ -167,3 +169,32 @@ TextColor.formatColor("Example", TextColor.CYAN);
167169TextColor . formatBackground(" Example" , TextColor . CYAN_BACKGROUND );
168170TextColor . formatColors(" Example" , TextColor . CYAN , TextColor . CYAN_BACKGROUND );
169171```
172+ -- -
173+
174+ ### UI - Screenshot :
175+ Take a screenshot (PNG ):
176+ ```
177+ AdvImage . takeScreenshot(File nameOfTheScreenshot);
178+ ```
179+ By the way : it returns a File object !
180+ ```java
181+ File file = new File (" C:\\ Users\\ Public\\ Desktop\\ screenshot.png" );
182+ System . out. println(file. exists());
183+ file = AdvImage . takeScreenshot(file);
184+ System . out. println(file. exists());
185+ ```
186+ Output :
187+ ```java
188+ false
189+ true
190+ ```
191+ You like JPEG ?
192+ ```
193+ AdvImage . takeJPEGScreenshot(File nameOfTheScreenshot);
194+ ```
195+ You want to take multiple screenshots ?
196+ ```
197+ AdvImage . takeScrenshots(File path, int amount, int delay);
198+ AdvImage . takeScrenshots(File path, int amount, int delay, boolean inNewThread);
199+ ```
200+ Important : the input file needs to be a directory !
0 commit comments