#pragma once namespace math { template inline int sgn(T t) { return t == 0 ? 0 : t > 0 ? 1 : -1; } }