Search the Community
Showing results for tags 'rs'.
-
Buying OSRS Gold Always Buying! (Also buying smaller amounts starting from just 50M !) My Discord: dovisgold Unique ID: 569672499537903616 Click here to Join my Discord Server Discord is case sensitive, please copy&paste when adding me, and always check the Unique ID! Payment methods: BTC/ETH or any other crypto SEPA(Bank Transfer in Europe) PayPal Skrill Cashapp UK Bank Transfer Coinbase Binance +more Gold Transfer Methods: Trade Stake PvP kill 24/7 ONLINE ON: Skype: live:bd9c2f85a33e85a8 | add me on skype Discord: dovisgold Discord Unique ID: 569672499537903616
-
Buying 150m 07 Paypal, discord: rasty456#6503 or pm me for my Skype!
-
Test case: logger.debug(formatRSUnit(559546000000l)); // 559.54B logger.debug(formatRSUnit(19546000000l)); // 19.54B logger.debug(formatRSUnit(1954600000l)); // 1.95B logger.debug(formatRSUnit(155400000l)); // 155.4M logger.debug(formatRSUnit(70000000l)); // 70.0M logger.debug(formatRSUnit(5400000l)); // 5.40M logger.debug(formatRSUnit(450000l)); // 450.0K logger.debug(formatRSUnit(12000l)); // 12.0K logger.debug(formatRSUnit(8000l)); // 8.0K logger.debug(formatRSUnit(600l)); // 600 logger.debug(formatRSUnit(50l)); // 50 logger.debug(formatRSUnit(2l)); // 2 Source code: private static final DecimalFormat UNIT_FORMAT = new DecimalFormat(".0#"); /** * @author Explv (https://osbot.org/forum/profile/192661-explv/) * @author LiveRare (https://osbot.org/forum/profile/23977-liverare/) * * @param value * - An amount * @return Formatted RS unit */ public static String formatRSUnit(final long value) { String suffix; double convertedValue; if (value >= 1_000_000_000) { convertedValue = ((double) value / 1_000_000_000); suffix = "B"; } else if (value >= 1_000_000) { convertedValue = ((double) value / 1_000_000); suffix = "M"; } else if (value >= 1000) { convertedValue = ((double) value / 1000); suffix = "K"; } else { return String.valueOf(value); } convertedValue = Math.floor(convertedValue * 100) / 100; return UNIT_FORMAT.format(convertedValue) + suffix; } I think I've over-complicated something here. If I have, please tell me how.
- 7 replies
-
- 3
-
- rs
- unit format
-
(and 2 more)
Tagged with:
-
Selling 07 GOLD 1,1$/M Paypal Only! Discord: Dollar99#1429 Skype: deizyra
-
PM me if yo uneed botting advice, this service is over for the moment though. Hi, I'm offering the OSB community with the following services, free in exchange for + Rep once the service has been completed. *7QP - I'll get 7QP on your account, reguardless of starter cash. *Powerleveling(~12 hours), I'll mirror-mode train your accounts in: -Fishing -Woodcutting -Mining -Combat *Tutorial Island - I'll make an account for you(verified emails/Legit char name), run it through tut island and give you the details, all for a +1 Rep. Contact Method: Private Message -FREE- Terms of Service Simple: -Not resonsible for any bans, though I will treat your account with the same care that mine receive. extended 1 You will not log into the account during a service unless you have permission from the owner of the service, doing so will result in the termination of the service with NO Refund. 2. You MUST NOT change the details of the account until the service has been completed, doing so will result in a void service with NO Refund. 3. If there are any items required for the service, it is between you and the service owner to come to an agreement on who covers them 4. You MUST change your password after the service is completed 5. If you have any substantial wealth on the account, it is your responsibility to protect it (Either Bank Pin/Transfer Trade) 6. Once the service is complete you must leave Feedback for the relevant parties involved 7. You MUST Post on the service thread to acknowledge their individual T.O.S and start the service 8. If the Service is requested to be done legit, any T.O.S related to bans/mutes become obsolete (Unless evidence can be provided of prior botting)"