This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <math.h> // include this at the top of your .c file | |
Vector2 get_vector_towards_position(Vector2 from, Vector2 to) { | |
int dx = from.x - to.x; | |
int dy = from.y - to.y; | |
double angle_between_points = atan2(dy, dx); | |
return (Vector2){-cos(angle_between_points), -sin(angle_between_points)}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
UPDATE_COUNT=$(xbps-install -SMnu | wc -l) | |
notify-send "$UPDATE_COUNT updates are available for install." |