See all my time slacking off-ahem doing research with Destiny 2 paid off!

the inventory is much cleaner now and you can immediately see which are the best weapons. The value is a sort of overall power. It counts damage mainly since that's the main stat of the weapons, and does an average of the other important stats. I don't count magazine size and reload, since that's probably not so important as the other ones.
Now need to do the armors which will be tricker, since they have values for each damage type: Normal, AP, Energy, Explosive, Acid, Psionic. So the value displayed will probably be an average, since I don't think I'll manage to fit 5 numbers in the inventory...