News for hackers. Stuff that matters.
Re:Adobe Photoshop 1.0 Source Code (2013) by tgtweak on Tuesday December 23, 2025 @10:34AM (#46366128)
This actually looks surprisingly straightforward for what the function is doing - certainly if you have domain context of image editing or document placement. You'll find it in a lot of UI code - this one uses bit shifts for efficiency but what it's doing is pretty straightforward.

For clarity and to demonstrate, this is basically what this function is doing, but in css:

.container {

  position: relative;
}

.obj {

  position: absolute;

  left: 50%;

  top: 50%;

  transform: translate(-50%, -50%);


}

There are no comments on this comment yet.