wavelength 1.0.0
Loading...
Searching...
No Matches
vector2.h
Go to the documentation of this file.
1#pragma once
2
3#include "os/prnstream.h"
4
12struct Vector2 {
13 float x;
14 float y;
15};
16
26PrnStream &operator<<(PrnStream &stream, const Vector2 &vector);
27
28namespace Rnd {
29
40void Add(const Vector2 &a, const Vector2 &b, Vector2 &out);
41
50void Normalize(const Vector2 &v, Vector2 &out);
51
58float Length(const Vector2 &v);
59
60} // namespace Rnd
Text output stream.
Definition prnstream.h:16
Definition gfxtunnel.h:41
void Normalize(const Vector2 &v, Vector2 &out)
Scale a two-component vector to unit length.
float Length(const Vector2 &v)
Report the length of a two-component vector.
void Add(const Vector2 &a, const Vector2 &b, Vector2 &out)
Add two two-component vectors.
Two-component vector, used for texture coordinates.
Definition vector2.h:12
float x
Definition vector2.h:13
float y
Definition vector2.h:14
PrnStream & operator<<(PrnStream &stream, const Vector2 &vector)
Write a vector as (x: y:).