tochie-kit/nodes/singletons/Arithmetic.gd

9 lines
247 B
GDScript3
Raw Normal View History

extends Node
class_name TK_Arithmetic
static func float_mod(p_a: float, p_b: float) -> float:
return p_a - (p_b * floor(p_a / p_b))
static func vector2_mod(p_a: Vector2, p_b: Vector2) -> Vector2:
return p_a - (p_b * (p_a / p_b).floor())