Пример #1
0
void writePoint(OutputStream* outputStream, Point* point) {
    appendDecf(outputStream, point->x);
    appendString(outputStream, CSV_SEPARATOR);

    appendDecf(outputStream, point->y);
    appendString(outputStream, CSV_SEPARATOR);
}
Пример #2
0
bool absFloatTest(void) {
    signed long value = 40000.0;
    signed long absValue = fabsf(value);
    
    appendCRLF(getDebugOutputStreamLogger());
    appendString(getDebugOutputStreamLogger(), "absFloatTest\n");
    appendString(getDebugOutputStreamLogger(), "NORMAL=");
    appendDecf(getDebugOutputStreamLogger(), value);
    appendCRLF(getDebugOutputStreamLogger());

    appendString(getDebugOutputStreamLogger(), "RESULT=");
    appendDecf(getDebugOutputStreamLogger(), absValue);
    appendCRLF(getDebugOutputStreamLogger());

    return false;
}
Пример #3
0
void writeBSplinePointData(OutputStream* outputStream, BSplinePointData* splinePointData) {
    float t = splinePointData->time;
    appendDecf(outputStream, t);
    appendString(outputStream, CSV_SEPARATOR);

    Point point = splinePointData->point;
    writePoint(outputStream, &point);

    float distance = splinePointData->length;
    appendDecf(outputStream, distance);
    appendString(outputStream, CSV_SEPARATOR);

    float orientation = splinePointData->orientation;
    appendDecf(outputStream, orientation);

    println(outputStream);
}
Пример #4
0
bool convertFloatTest2(void) {
    signed long value = -40000;
    float result = (float) value;
    
    appendCRLF(getDebugOutputStreamLogger());
    appendString(getDebugOutputStreamLogger(), "convertFloatTest2\n");
    appendString(getDebugOutputStreamLogger(), "NORMAL=-40000.0000");
    appendCRLF(getDebugOutputStreamLogger());

    appendString(getDebugOutputStreamLogger(), "RESULT=");
    appendDecf(getDebugOutputStreamLogger(), result);
    appendCRLF(getDebugOutputStreamLogger());

    return false;
}
Пример #5
0
void appendStringAndDecf(OutputStream* stream, const char* s, float value) {
	appendString(stream, s);
    appendDecf(stream, value);
}