[Q] fast way to negate?
- From: Rob Mitchell <rob@xxxxxxxxxxxxxxxxx>
- Date: Mon, 12 Dec 2005 20:53:57 -0600
What's the fastest way to negate a number in Java?
int x = 1;
int negX *= -1;
What if "x" is already negative?
TIA!
Rob
.
- Follow-Ups:
- Re: [Q] fast way to negate?
- From: Roedy Green
- Re: [Q] fast way to negate?
- From: Luke Webber
- Re: [Q] fast way to negate?
- Prev by Date: help with saving a JPanel to jpg
- Next by Date: [Q] fast way to negate?
- Previous by thread: help with saving a JPanel to jpg
- Next by thread: Re: [Q] fast way to negate?
- Index(es):
Relevant Pages
|