YCPBuiltinFloat.cc File Reference

#include <unistd.h>
#include <stdio.h>
#include "ycp/YCPBuiltinFloat.h"
#include "ycp/YCPFloat.h"
#include "ycp/YCPString.h"
#include "ycp/YCPInteger.h"
#include "ycp/StaticDeclaration.h"
#include "y2log.h"

Functions

static YCPValue f_plus (const YCPFloat &f1, const YCPFloat &f2)
static YCPValue f_minus (const YCPFloat &f1, const YCPFloat &f2)
static YCPValue f_mult (const YCPFloat &f1, const YCPFloat &f2)
static YCPValue f_div (const YCPFloat &f1, const YCPFloat &f2)
static YCPValue f_neg (const YCPFloat &f1)
static YCPValue f_tostring (const YCPFloat &f, const YCPInteger &precision)
 Converts a floating point number to a string Converts a floating point number to a string, using the specified precision.
static YCPValue f_tofloat (const YCPValue &v)
 Converts a value to a floating point number. If the value can't be converted to a float, nilfloat is returned.

Variables

StaticDeclaration static_declarations

Function Documentation

static YCPValue f_div const YCPFloat f1,
const YCPFloat f2
[static]
 

float f1 * float f2 -> float Division of floats.

Example:

 1.5 / 2.5 -> 0.6
 

static YCPValue f_minus const YCPFloat f1,
const YCPFloat f2
[static]
 

float f1 - float f2 -> float Subtraction of floats.

Example:

 1.5 - 2.5 -> -1.0
 

static YCPValue f_mult const YCPFloat f1,
const YCPFloat f2
[static]
 

float f1 * float f2 -> float Multiplication of floats.

Example:

 1.5 * 2.5 -> 3.75
 

static YCPValue f_neg const YCPFloat f1  )  [static]
 

- float i -> float Negative of float.

static YCPValue f_plus const YCPFloat f1,
const YCPFloat f2
[static]
 

float f1 + float f2 -> float Addition of floats.

Example:

 1.5 + 2.5 -> 4.0
 

static YCPValue f_tofloat const YCPValue v  )  [static]
 

Converts a value to a floating point number. If the value can't be converted to a float, nilfloat is returned.

tofloat

Parameters:
any VALUE
Returns:
float
tofloat (4) -> 4.0 tofloat ("42") -> 42.0 tofloat ("3.14") -> 3.14

static YCPValue f_tostring const YCPFloat f,
const YCPInteger precision
[static]
 

Converts a floating point number to a string Converts a floating point number to a string, using the specified precision.

tostring

Parameters:
float FLOAT
integer PRECISION
Returns:
string tostring (0.12345, 4) -> 0.1235


Variable Documentation

StaticDeclaration static_declarations
 


Generated on Fri Jun 16 18:07:45 2006 for yast2-core by  doxygen 1.4.6