mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 16:37:27 +00:00
More unused code
clamping position to pixels not needed since we now work in pixels not floating point co-ords.
This commit is contained in:
parent
905f739826
commit
59aefea2e9
1 changed files with 0 additions and 9 deletions
|
|
@ -169,15 +169,6 @@ gl_size(const unsigned int sz, const unsigned int viewport_size) {
|
|||
return px * sz;
|
||||
}
|
||||
|
||||
static inline float
|
||||
clamp_position_to_nearest_pixel(float pos, const unsigned int viewport_size) {
|
||||
// clamp the specified opengl position to the nearest pixel
|
||||
const float px = 2.f / viewport_size;
|
||||
const float distance = pos + 1.f;
|
||||
const float num_of_pixels = roundf(distance / px);
|
||||
return -1.f + num_of_pixels * px;
|
||||
}
|
||||
|
||||
static inline float
|
||||
gl_pos_x(const unsigned int px_from_left_margin, const unsigned int viewport_size) {
|
||||
const float px = 2.f / viewport_size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue