Skip to content

Commit 1ab586c

Browse files
committed
Apply editorial changes
1 parent 5464a63 commit 1ab586c

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

include/twin_private.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,8 @@ static inline int twin_clz(uint32_t v)
573573
/* http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogDeBruijn */
574574
static const uint8_t mul_debruijn[] = {
575575
0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30,
576-
8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31};
576+
8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31,
577+
};
577578

578579
v |= v >> 1;
579580
v |= v >> 2;

src/geom.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ twin_dfixed_t _twin_distance_to_line_squared(twin_spoint_t *p,
1919
twin_spoint_t *p1,
2020
twin_spoint_t *p2)
2121
{
22-
/*
23-
* Convert to normal form (AX + BY + C = 0)
22+
/* Convert to normal form (AX + BY + C = 0)
2423
*
2524
* (X - x1) * (y2 - y1) = (Y - y1) * (x2 - x1)
2625
*

src/image.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,14 @@ typedef enum {
3131
#undef _
3232
} twin_image_format_t;
3333

34-
/*
35-
* Defines the headers of supported image formats.
34+
/* Define the headers of supported image formats.
3635
* Each image format has a unique header, allowing the format to be determined
3736
* by inspecting the file header.
38-
* Supported formats: PNG, JPEG.
39-
* Reference:
37+
* Supported formats:
4038
* - PNG:
41-
* http://www.libpng.org/pub/png/spec/1.2/PNG-Rationale.html#R.PNG-file-signature
39+
* http://www.libpng.org/pub/png/spec/1.2/PNG-Rationale.html#R.PNG-file-signature
4240
* - JPEG:
43-
* https://www.file-recovery.com/jpg-signature-format.htm
41+
* https://www.file-recovery.com/jpg-signature-format.htm
4442
*/
4543
#if __BYTE_ORDER == __BIG_ENDIAN
4644
static const uint8_t header_png[8] = {
@@ -83,6 +81,7 @@ static twin_image_format_t image_type_detect(const char *path)
8381
return type;
8482
}
8583

84+
/* Function prototypes for implementations */
8685
#define _(x) \
8786
twin_pixmap_t *_twin_##x##_to_pixmap(const char *filepath, \
8887
twin_format_t fmt);

src/trig.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66

77
#include "twin_private.h"
88

9-
/*
10-
* angles are measured from -2048 .. 2048
11-
*/
9+
/* angles are measured from -2048 .. 2048 */
1210

1311
twin_fixed_t twin_sin(twin_angle_t a)
1412
{
@@ -32,8 +30,7 @@ twin_fixed_t twin_tan(twin_angle_t a)
3230
if (c == 0) {
3331
if (s > 0)
3432
return TWIN_FIXED_MAX;
35-
else
36-
return TWIN_FIXED_MIN;
33+
return TWIN_FIXED_MIN;
3734
}
3835
if (s == 0)
3936
return 0;

0 commit comments

Comments
 (0)