Added a profiler.

This commit is contained in:
2026-08-07 12:28:18 -07:00
parent 14d87eac10
commit 47b9a9ae38
6 changed files with 207 additions and 63 deletions
+9 -9
View File
@@ -7,7 +7,7 @@ struct v2 {
float e[2];
};
struct v2 V2(float x, float y)
struct v2 v2(float x, float y)
{
struct v2 result;
@@ -17,7 +17,7 @@ struct v2 V2(float x, float y)
return result;
}
struct v2 V2Multiply(float a, struct v2 b)
struct v2 v2_multiply(float a, struct v2 b)
{
struct v2 result;
@@ -27,7 +27,7 @@ struct v2 V2Multiply(float a, struct v2 b)
return result;
}
struct v2 V2Unary(struct v2 a)
struct v2 v2_unary(struct v2 a)
{
struct v2 result;
@@ -37,7 +37,7 @@ struct v2 V2Unary(struct v2 a)
return result;
}
struct v2 V2Add(struct v2 a, struct v2 b)
struct v2 v2_add(struct v2 a, struct v2 b)
{
struct v2 result;
@@ -47,7 +47,7 @@ struct v2 V2Add(struct v2 a, struct v2 b)
return result;
}
struct v2 V2Subtract(struct v2 a, struct v2 b)
struct v2 v2_subtract(struct v2 a, struct v2 b)
{
struct v2 result;
@@ -57,7 +57,7 @@ struct v2 V2Subtract(struct v2 a, struct v2 b)
return result;
}
float Square(float a)
float square(float a)
{
float result;
@@ -66,15 +66,15 @@ float Square(float a)
return result;
}
float InnerProduct(struct v2 a, struct v2 b)
float inner_product(struct v2 a, struct v2 b)
{
float result = a.x*b.x + a.y*b.y;
return result;
}
float LengthSq(struct v2 a)
float length_sq(struct v2 a)
{
float result = InnerProduct(a, a);
float result = inner_product(a, a);
return result;
}