Documentation
¶
Index ¶
- Variables
- type Fixed
- func (x Fixed) Abs() Fixed
- func (x Fixed) Add(y Fixed) Fixed
- func (x Fixed) Bytes() []byte
- func (x Fixed) Ceil() int64
- func (x Fixed) Div(y Fixed) Fixed
- func (x Fixed) EqualTo(y Fixed) bool
- func (x Fixed) Float() float64
- func (x Fixed) Floor() int64
- func (x Fixed) GreaterThan(y Fixed) bool
- func (x Fixed) LessThan(y Fixed) bool
- func (x Fixed) Mul(y Fixed) Fixed
- func (x Fixed) Neg() Fixed
- func (x Fixed) Round() int64
- func (x Fixed) String() string
- func (x Fixed) Sub(y Fixed) Fixed
Constants ¶
This section is empty.
Variables ¶
View Source
var ( One = fixedOne Zero = Fixed{} )
View Source
var ErrOverflow = errors.New("overflow")
Functions ¶
This section is empty.
Types ¶
type Fixed ¶
type Fixed struct {
// contains filtered or unexported fields
}
72/56 fixed-point value
func FracFromBytes ¶
FracFromBytes takes only fractional part from bytes array and return fixed value
func (Fixed) GreaterThan ¶
GreaterThan compares fixed values and returns true if x > y
Click to show internal directories.
Click to hide internal directories.