You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
906 B
40 lines
906 B
// ========================================================================
|
|
//
|
|
// Copyright (C) 2016-2017 MARC CHEVALDONNE
|
|
// marc.chevaldonne.free.fr
|
|
//
|
|
// Module : Droite.cs
|
|
// Author : Marc Chevaldonné
|
|
// Creation date : 2016-10-03
|
|
//
|
|
// ========================================================================
|
|
|
|
namespace ex_028_006_Strategy_et_interface
|
|
{
|
|
class Droite : IModifieur
|
|
{
|
|
public int Offset
|
|
{
|
|
get;
|
|
private set;
|
|
}
|
|
|
|
public int Pente
|
|
{
|
|
get;
|
|
private set;
|
|
}
|
|
|
|
public Droite(int offset, int pente)
|
|
{
|
|
Offset = offset;
|
|
Pente = pente;
|
|
}
|
|
|
|
public int Modifier(int nombreAModifier)
|
|
{
|
|
return Offset + Pente * nombreAModifier;
|
|
}
|
|
}
|
|
}
|