|
-
Apr 16th, 2013, 01:14 PM
#1
Thread Starter
New Member
Something happen !! quick help ...
Can anyone explain for me this code i can`t understand it ....
Code:
Sub dimSquare()
If xUp < 0 Then xUp = 0
If xUp > 600 Then xUp = 600
If yUp < 0 Then yUp = 0
If yUp > 480 Then yUp = 480
intW = Math.Abs(xUp - xDown)
intH = Math.Abs(yUp - yDown)
If intW > intH Then intW = intH
If xUp < xDown Then intL = xDown - intW Else intL = xDown
If yUp < yDown Then intT = yDown - intW Else intT = yDown
End Sub
Sub dimRectangle()
If xUp < 0 Then xUp = 0
If xUp > 1000 Then xUp = 1000
If yUp < 0 Then yUp = 0
If yUp > 480 Then yUp = 480
intW = Math.Abs(xUp - xDown)
intH = Math.Abs(yUp - yDown)
If xUp < xDown Then intL = xDown - intW Else intL = xDown
If yUp < yDown Then intT = yDown - intH Else intT = yDown
End Sub
Sub dimCircle()
If xUp < 0 Then xUp = 0
If xUp > 600 Then xUp = 600
If yUp < 0 Then yUp = 0
If yUp > 480 Then yUp = 480
intW = Math.Abs(xUp - xDown)
intH = Math.Abs(yUp - yDown)
If intW < intH Then intW = intH
intL = xDown - intW
intT = yDown - intW
intW *= 2
End Sub
Sub dimEllipse()
If xUp < 0 Then xUp = 0
If xUp > 600 Then xUp = 600
If yUp < 0 Then yUp = 0
If yUp > 480 Then yUp = 480
intW = Math.Abs(xUp - xDown)
intH = Math.Abs(yUp - yDown)
intL = xDown - intW
intT = yDown - intH
intW *= 2
intH *= 2
End Sub
-
Apr 16th, 2013, 01:29 PM
#2
Re: Something happen !! quick help ...
You must remember we are all volunteers. We understand you need help but you will delay help in using poor thread titles. You say something has happened yet posted a question asking what code does. You clearly have not written this. Why should be look at your code when you have made no effort to explain what you are doing?
-
Apr 16th, 2013, 01:43 PM
#3
Thread Starter
New Member
Re: Something happen !! quick help ...
 Originally Posted by ident
You must remember we are all volunteers. We understand you need help but you will delay help in using poor thread titles. You say something has happened yet posted a question asking what code does. You clearly have not written this. Why should be look at your code when you have made no effort to explain what you are doing?
It's not a matter of being not understanding the code!it's about finding someone to explain the mathematical operations in the code so i can Learn and Apply it.
thank you
-
Apr 16th, 2013, 05:55 PM
#4
Re: Something happen !! quick help ...
If you can understand mathematical symbols, you can understand that code:
Sub dimSquare()
If xUp < 0 Then xUp = 0 'Ensure that xUp is not less than 0
If xUp > 600 Then xUp = 600 'Ensure that xUp is not more than 600
If yUp < 0 Then yUp = 0 'Ensure that xUp is not less than 0
If yUp > 480 Then yUp = 480 'Ensure that xUp is not more than 480
intW = Math.Abs(xUp - xDown) 'Set intW to xUp minus xDown ensuring that the value is positive (that's the ABS part)
intH = Math.Abs(yUp - yDown)
etc etc..
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|