Click here to Skip to main content
15,890,506 members
Home / Discussions / Java
   

Java

 
GeneralRe: Main method Pin
jschell17-Sep-11 14:46
jschell17-Sep-11 14:46 
GeneralRe: Main method Pin
Richard MacCutchan17-Sep-11 21:22
mveRichard MacCutchan17-Sep-11 21:22 
GeneralRe: Main method Pin
Nagy Vilmos15-Sep-11 23:07
professionalNagy Vilmos15-Sep-11 23:07 
GeneralRe: Main method Pin
David Skelly16-Sep-11 2:12
David Skelly16-Sep-11 2:12 
QuestionMultiple Client/Server Chat messaging problem [modified] Pin
alli7712-Sep-11 14:13
alli7712-Sep-11 14:13 
AnswerRe: Multiple Client/Server Chat messaging problem Pin
Richard MacCutchan12-Sep-11 21:31
mveRichard MacCutchan12-Sep-11 21:31 
AnswerRe: Multiple Client/Server Chat messaging problem Pin
Nagy Vilmos12-Sep-11 22:31
professionalNagy Vilmos12-Sep-11 22:31 
QuestionNumber problems Pin
Liam S. Crouch11-Sep-11 7:03
Liam S. Crouch11-Sep-11 7:03 
Java
if(ddirection > 8.00)
		{
			direction = Direction.DOWN;
		}
		if(ddirection < 0.00)
		{
			direction = Direction.UP;
		}
		if(direction == Direction.UP)
		{
			ddirection = ddirection + 0.05;
		}
		else
		{
			ddirection = ddirection + 0.05;
		}


I am trying to make the double ddirection go up and down between 8.0 and 0.0

The above code does not work. What else can i do?

Direction is an enum, containing UP and DOWN. direction is a variable of type Direction.
AnswerRe: Number problems Pin
Gerben Jongerius11-Sep-11 7:21
Gerben Jongerius11-Sep-11 7:21 
AnswerRe: Number problems Pin
Richard MacCutchan11-Sep-11 7:31
mveRichard MacCutchan11-Sep-11 7:31 
AnswerRe: Number problems Pin
Luc Pattyn11-Sep-11 7:45
sitebuilderLuc Pattyn11-Sep-11 7:45 
GeneralRe: Number problems Pin
TorstenH.11-Sep-11 22:47
TorstenH.11-Sep-11 22:47 
AnswerRe: Number problems Pin
Charles Putney13-Sep-11 1:47
Charles Putney13-Sep-11 1:47 
Questionhi Pin
GANESH238911-Sep-11 3:23
GANESH238911-Sep-11 3:23 
AnswerRe: hi Pin
Richard MacCutchan11-Sep-11 4:03
mveRichard MacCutchan11-Sep-11 4:03 
GeneralRe: hi Pin
GANESH238911-Sep-11 6:44
GANESH238911-Sep-11 6:44 
GeneralRe: hi Pin
Richard MacCutchan11-Sep-11 7:20
mveRichard MacCutchan11-Sep-11 7:20 
GeneralRe: hi Pin
GANESH238911-Sep-11 7:27
GANESH238911-Sep-11 7:27 
AnswerRe: hi Pin
TorstenH.11-Sep-11 22:49
TorstenH.11-Sep-11 22:49 
Questionhi guys,, Pin
GANESH238911-Sep-11 3:21
GANESH238911-Sep-11 3:21 
AnswerRe: hi guys,, Pin
Simon Bang Terkildsen11-Sep-11 3:30
Simon Bang Terkildsen11-Sep-11 3:30 
GeneralRe: hi guys,, Pin
GANESH238911-Sep-11 6:47
GANESH238911-Sep-11 6:47 
GeneralRe: hi guys,, Pin
Richard MacCutchan11-Sep-11 7:22
mveRichard MacCutchan11-Sep-11 7:22 
QuestionData stores for Java Pin
oraclepilot7-Sep-11 7:03
oraclepilot7-Sep-11 7:03 
AnswerRe: Data stores for Java Pin
Nagy Vilmos7-Sep-11 7:06
professionalNagy Vilmos7-Sep-11 7:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.