MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / writeValue

Method writeValue

source/core/StarNetElementFloatFields.hpp:199–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197
198template <typename T>
199void NetElementFloating<T>::writeValue(DataStream& ds, T t) const {
200 if (m_fixedPointBase)
201 ds.writeVlqI(round(t / *m_fixedPointBase));
202 else
203 ds.write(t);
204}
205
206template <typename T>
207T NetElementFloating<T>::readValue(DataStream& ds) const {

Callers

nothing calls this directly

Calls 3

roundFunction · 0.85
writeVlqIMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected