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
# Public domain, as per The Unlicense. NO WARRANTY. See https://unlicense.org | |
class_name NumberLimits | |
## Useful for dealing with numerical limits. | |
## Minimum positive 64-bit floating-point number > 0. | |
## [br]0x0000000000000001 | |
const FLOAT64_MIN_SUBNORMAL: float = 2.0**-1074 # ≈ 4.9406564584124654e-324 | |
## Maximum positive 64-bit floating-point subnormal number (min possible value in binary exponent). | |
## [br]0x000FFFFFFFFFFFFF |
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
# ScreenAnchor as tweeted by @the_duriel: https://x.com/the_duriel/status/1712183527477809452?s=20 | |
@tool | |
extends MarginContainer | |
class_name ScreenAnchor | |
## Control which can be anchored to a relative screen position | |
@export var offset: Vector2 = Vector2(0.5, 0.5): | |
set(value): offset = value; _update_position() | |
enum ORIGIN {CENTER, TOP_LEFT, TOP_RIGHT, BOT_LEFT, BOT_RIGHT} |