From cb583d02778f8b1b4bcc6cf8344e4f26c5def05c Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 17 Nov 2025 00:52:44 +0000 Subject: [PATCH] types -> prick_aliases --- types.h => prick_aliases.h | 40 +++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) rename types.h => prick_aliases.h (60%) diff --git a/types.h b/prick_aliases.h similarity index 60% rename from types.h rename to prick_aliases.h index 126bb77..3b81445 100644 --- a/types.h +++ b/prick_aliases.h @@ -1,20 +1,17 @@ -/* Copyright (C) 2025 Aryadev Chavali - - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the Unlicense for details. - - * You may distribute and modify this code under the terms of the Unlicense, - * which you should have received a copy of along with this program. If not, - * please go to . - +/* prick_aliases.h: * Created: 2025-04-09 - * Description: Some basic type definitions to make life easier. + * Author: Aryadev Chavali + * License: See end of file + * Commentary: + + This library defines some useful aliases for common types. These are mostly + handpicked, and aren't necessary. */ -#ifndef TYPES_H -#define TYPES_H +#ifndef PRICK_ALIASES_H +#define PRICK_ALIASES_H +#include #include typedef uint8_t u8; @@ -27,4 +24,21 @@ typedef int16_t i16; typedef int32_t i32; typedef int64_t i64; +static_assert(sizeof(float) == 4, "f32 requires 4 byte floats"); +static_assert(sizeof(double) == 8, "f64 requires 8 byte doubles"); +typedef float f32; +typedef double f64; + #endif + +/* Copyright (C) 2025 Aryadev Chavali + + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the Unlicense for details. + + * You may distribute and modify this code under the terms of the Unlicense, + * which you should have received a copy of along with this program. If not, + * please go to . + +*/