Class: Mathtype::Mtef16

Inherits:
BinData::Primitive
  • Object
show all
Defined in:
lib/records/bintypes.rb

Instance Method Summary collapse

Instance Method Details

#getObject

[View source]

6
# File 'lib/records/bintypes.rb', line 6

def get; (high << 8) + low end

#gethighObject

[View source]

10
11
12
# File 'lib/records/bintypes.rb', line 10

def gethigh
  self.high
end

#getlowObject

[View source]

7
8
9
# File 'lib/records/bintypes.rb', line 7

def getlow
  self.low
end

#set(v) ⇒ Object

[View source]

13
14
15
16
# File 'lib/records/bintypes.rb', line 13

def set(v)
  self.low = v & 0xFF
  self.high = (v & 0xFF00) >> 8
end