vE5li / korangar

A next-gen Ragnarok Online client
MIT License
147 stars 33 forks source link

Clean up `cgmath` initializers #100

Open vE5li opened 4 weeks ago

vE5li commented 4 weeks ago

There are a lot of places all over the code base where we initialize points and vectors like this

camera_position: Point3::new(0.0, 0.0, 0.0),
view_direction: Vector3::new(1.0, 0.0, 0.0),
look_up_vector: Vector3::new(0.0, -1.0, 0.0),

While perfectly valid, there are functions provided by cgmath such as unit_x/unit_y/unit_z for initializing Vectors and zero for Point3.

This is a very easy task and just requires some manual labor.