gitlab.com/evatix-go/core@v1.3.55/coremath/unsignedInteger16Within.go (about)

     1  package coremath
     2  
     3  import (
     4  	"math"
     5  )
     6  
     7  type unsignedInteger16Within struct{}
     8  
     9  func (it unsignedInteger16Within) ToByte(value uint16) bool {
    10  	return value <= 255
    11  }
    12  
    13  func (it unsignedInteger16Within) ToInt8(value uint16) bool {
    14  	return value <= math.MaxInt8
    15  }