Garry's Mod Wiki

File:ReadFloat

File:ReadFloat

  number File:ReadFloat()

Description

Reads an IEEE 754 little-endian 4-byte float from the file.

Returns

1 number
The read value

Example

local f = file.Open( "test.txt", "w", "DATA" ) f:WriteFloat( math.pi ) f:WriteFloat( 66.99 ) f:Close() local f = file.Open( "test.txt", "r", "DATA" ) f:Seek( 4 ) print( f:ReadFloat() ) -- Prints 66.98999786377 f:Close()

Special Pages


Wikis

?

Render Time: 20ms

DB GetPage 2
Generate Html 2
SaveChanges (1) 6
Render Body 0
Render Sidebar 7