How smart is Sup Forums? Can you answer this question I use in company interviews in a game development company?
Can Sup Forums get hired?
Can you please stop trying to get us to do your homework.
where do you work that uses this
Croteam
Have you ever came across a person who could not answer the question? Internet doesn't count.
In an interview? I don't do the interviews, I just know about the question. I know of one person that failed it but still got accepted and is working even today with us
ive known c++ and php for a while and i cant do it, wtf is worng iwth me
Wtf does topBottom mean? Left right?
thirdH = redY - (greenY + greenH)
redY = redY - thirdH
greenH = greenH + thirdH
sorry user, you didn't get the job
granate na hrvate
It must account the redH too, you are close
I just read "upper left of image is an x y of 0,0"
I decided the question is badly worded and it was stating that x and y are of the upper left of each rectangle.
I didn't create variables for each vertex
If the top left is 0, 0 then why does the image visually show the green Y subtracted from the red Y by being further down?
Given the image doesn't say what the question means, the questioner can't be believed to mean what he says.
This is one of the cringiestly bad interview questions I have ever seen and OP should be thoroughly ashamed of himself
Explain the variables. They make no sense right now.
we are not going to do your homework
Why are you assuming this is homework? I doubt any class does this type of stuff. Try again, if you can
Here, I did your homework. Please don't come back.
// Height of third rectangle
var heightThird = redBox.Y - (greenBox.Y + greenbox.Height);
// Assuming the working space is infinite
redBox.Y = greenBox.Y + greenBox.Height + bufferBetween;
// No matter the width, they won't intersect.
That question doesn't meet the standard expected of domain descriptions sufficient to start design much less coding; my answer is to send it back to whichever client it's from
>itt op cant into bounding boxes
pretty much what said, that shit is 2d, fuck off op
height = green_y + green_height - red_y
red_y = green_y + green_height
this isn't even programming?
mathematics?
Incorrect, you must move the green box UP, not red box down....
Next time word your homework better you third world shithole fuck
yeah elementary school geometry is some tough shit, i'm surprised anyone got hired at your imaginary company
gb = gy+gh
rb = ry+rh
oh = max(min(gb,rb)-max(gy,ry),0)
gh -= oh
gb greenbox
gy greenY
gh greenH
rb redbox
ry redY
rh redH
oh ?????????????????????
kk ty
You can't change the height, only the Y coordinates, you must bring green up based on the height you get from 3rd square (the one made from overlapping)
If you know so much then why don't you do it?
gy = ry - gh - buffer
kill yourself
Unknown variable "buffer"
>X - LeftRight
>Y - TopBottom
Are you seriously expecting for people to help with your homework when you can't even figure out what you're being asked to do?
kys yourself op
>game development company
literally the shittiest industry to work in as a developer
might aswell make it yourself and do it 5x slowly
Do you know how graphics work, at all? OP is right.
Yes I actually do while both you and OP don't (let's pretend for a moment you're not OP samefagging).
What do those X and Y point to? Corner of the rectangle? Which one? Or Center? Or there are pairs of X and Y for every side of rectangle? Why tell W and H then, they're becoming redundant? Or maybe something yet different? LeftRight and TopBottom do not clearly refer to any of that and I don't see "solving puzzles" anywhere in the job description.