over/m/__init__.py

28 lines
No EOL
584 B
Python

#! /usr/bin/env python3
# encoding: utf-8
#
# Part of Project Overwatch
import sys
try:
from .cython_m import mat4, vec3
except ImportError:
print('!!! [%s] unable to load native implementation, using python instead' %(__name__), file=sys.stderr)
from .python_m import mat4, vec3
del sys
class MathError(Exception):
def __init__(self, description):
self.description = description
def __str__(self):
return self.description
class GeneralError(Exception):
def __init__(self, description):
self.description = description
def __str__(self):
return self.description