Broad-scale ecological implications of ectothermy and endothermy in changing environments