vmax.c
 1  /* ************************************************************************** */
 2  /*                                                                            */
 3  /*                                                        :::      ::::::::   */
 4  /*   vmax.c                                             :+:      :+:    :+:   */
 5  /*                                                    +:+ +:+         +:+     */
 6  /*   By: gychoi <gychoi@student.42seoul.kr>         +#+  +:+       +#+        */
 7  /*                                                +#+#+#+#+#+   +#+           */
 8  /*   Created: 2023/05/11 21:01:47 by gychoi            #+#    #+#             */
 9  /*   Updated: 2023/05/11 21:02:15 by gychoi           ###   ########.fr       */
10  /*                                                                            */
11  /* ************************************************************************** */
12  
13  #include "libvec.h"
14  
15  t_vec3	vmax(t_vec3 ret, t_vec3 vec)
16  {
17  	if (ret.x < vec.x)
18  		ret.x = vec.x;
19  	if (ret.y < vec.y)
20  		ret.y = vec.y;
21  	if (ret.z < vec.z)
22  		ret.z = vec.z;
23  	return (ret);
24  }