-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathm_draw_point.c
More file actions
20 lines (18 loc) · 1.06 KB
/
m_draw_point.c
File metadata and controls
20 lines (18 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* m_draw_point.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nkawaguc <nkawaguc@student.42tokyo.jp> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/28 12:17:52 by nkawaguc #+# #+# */
/* Updated: 2024/10/28 12:17:53 by nkawaguc ### ########.fr */
/* */
/* ************************************************************************** */
#include "m_fdf.h"
void draw_point(t_data *data, t_point p)
{
if (0 <= p.x && p.x < WIN_WIDTH
&& 0 <= p.y && p.y < WIN_HEIGHT)
data->addr[(int)p.y * WIN_WIDTH + (int)p.x] = p.color.num;
}