Skip to content

Instantly share code, notes, and snippets.

View alysenko's full-sized avatar

Andrey Lysenko alysenko

  • Saint Petersburg, Russia
View GitHub Profile
@alysenko
alysenko / scdialog.cpp
Created October 11, 2016 18:48
Sciter dialog implementation based on HTMLayout dialog
#include "stdafx.h"
#include "scdialog.h"
#include <vector>
using namespace gui;
using namespace sciter;
// ==========================================================================
LRESULT scdialog::on_load_data(LPSCN_LOAD_DATA pnmld)
{
@alysenko
alysenko / geo_angles.cpp
Last active February 18, 2019 14:49
Определение углов между веткторами
// ======================================================================
// Скалярное произведение двух векторов
template<typename D> inline double inner_prod(const D& a, const D& b)
{
/* Длина проекции a на b */
return double(a.x) * double(b.x) + double(a.y) * double(b.y);
}
// Векторное произведение двух векторов
// Результат положительный, если <b> слева от <a>