File:  [parser3project] / parser3 / src / types / pa_vmath.h
Revision 1.28: download - view: text, annotated - select for diffs - revision graph
Sat Apr 25 13:38:46 2026 UTC (8 weeks, 4 days ago) by moko
Branches: MAIN
CVS tags: HEAD
Copyright year updated, websites links changed to https://

/** @file
	Parser: @b math class decls.

	Copyright (c) 2001-2026 Art. Lebedev Studio (https://www.artlebedev.com)
	Authors: Konstantin Morshnev <moko@design.ru>, Alexandr Petrosian <paf@design.ru>
*/

#ifndef PA_VMATH_H
#define PA_VMATH_H

#define IDENT_PA_VMATH_H "$Id: pa_vmath.h,v 1.28 2026/04/25 13:38:46 moko Exp $"

// includes

#include "classes.h"
#include "pa_common.h"

// defines

#define PI		3.14159265358979
#define MathE	2.718281828459

/**
*/
class VMath: public VStateless_class {
public: // Value
	
	const char* type() const { return "math"; }

	// math: method,field
	Value* get_element(const String& aname) {
		// $method
		if(Value* result=VStateless_class::get_element(aname))
			return result;

		// $const
		return fconsts.get(aname);
	}

public: // usage

	VMath();

private:

	HashStringValue fconsts;

};

#endif

E-mail: