IgeEntity

Method: streamFloatPrecision

Gets / sets the precision by which floating-point values will be encoded and sent when packaged into stream data.
streamFloatPrecision (Number val)
  • Numberval The number of decimal places to preserve.
Returns * "this" when arguments are passed to allow method chaining or the current value if no arguments are specified.

Set the float precision to 2

// This will mean that any data using floating-point values
// that gets sent across the network stream will be rounded
// to 2 decimal places. This helps save bandwidth by not
// having to send the entire number since precision above
// 2 decimal places is usually not that important to the
// simulation.
entity.streamFloatPrecision(2);
© Copyright 2013 Irrelon Software Limited. All Rights Reserved. UK Registered Company Number: 07522767
Isogenic (ī´sōjen´ik): Adj originating from a common source; possessing the same genetic composition.
Strange Things Happen at the One Two Point