2,733
edits
Red Leader (talk | contribs) (Save) |
Red Leader (talk | contribs) (→is_defined(): Finish) |
||
Line 215: | Line 215: | ||
|syntax = geo.Coord.is_defined(); | |syntax = geo.Coord.is_defined(); | ||
|source = {{fgdata file|Nasal/geo.nas|t=Source}} | |source = {{fgdata file|Nasal/geo.nas|t=Source}} | ||
|text = | |text = Returns 1 (true) if all three coordinates (either x/y/z or /lat/lon/alt) are defined. Note that set_latlon() or set_xyz() must be used for this function to work correctly. | ||
|example1 = | |example1 = var coord = geo.Coord.new(); | ||
coord.set_xyz(10, 10, 10); | |||
print(coord.is_defined()); # prints "1" | |||
|example2 = var coord = geo.Coord.new(); | |||
print(coord.is_defined()); # prints "0" | |||
}} | }} | ||